2016年5月3日星期二

Advantages of JSON than XML and How to Convert XML to JSON

Why we convert XML to JSON?

Following are the reasons why and why not JSON is a better choice over XML :

1) JSON can contain Integer, String, List, Arrays. XML is just nodes and elements that needs to be parsed into Integer, String and so on before it is used by your application.

2) JSON is smaller, faster and lightweight compared to XML. So for data delivery between servers and browsers, JSON is a better choice.

3) JSON is best for use of data in web applications from web services   because of JavaScript which supports JSON. The overhead of parsing XML nodes is more compare to a quick lookup in JSON.

4) For a newbie, JSON might look complex to read and understand because of its structure unless it is well written with all brackets and commas properly indented. 

5) JSON can be mapped more easily into object oriented system.

6) JSON and XML both use Unicode and thus supports internationalization.

7) JSON is a better data exchange format. XML is a better document exchange format.

8) JSON is less secure because of absence of JSON parser in browser. 

9)If the data is in XML, you can write an XSLT template and run it over the XML to output the data into another format: HTML, SVG, plaintext,comma-delimited, even JSON. When you have data in JSON, it’s pretty much stuck there. There’s no easy way to change it into another data format. So here, XML scores over JSON.

Is there a dataconverter do this?

DataStorm is an easy to use Powerful assistant can convert the data format from/to PLIST, YML(YAML), XML, CSV, JSON, INI, PROPERTIES. Such as the sales date is in XML or JSON format, and you want to get that data in CSV for further analysis, you just need convert with DataStorm within few seconds. If you are a JAVA programmer, you need to convert your JSON into PROPERTIES, or XML to PROPERTIES, DataStorm can be done simply for you no matter how much data you had, because batch conversion is supported in DataStorm. If you want to convert your JSON, CSV, XML files to INI for Windows, Data storm would be the best assistant for you.

How to convert XML to JSON?

follow the step guide and begin your JSON to CSV conversion:

Step 1: Add XML file or files to the Program



Just click import filse and locate the file or files on your hard drive that you want to convert.

Step 2: click Settings and click Output directory, and Save it.



Step 3: Choose JSON Format and click save.



Then it begin to convert XML files or files to the target JSON format with a few seconds, the conversion finished. And then you can get the converted XML file or files.
  

2016年4月25日星期一

How to Convert Apple Property List to XML on Mac

As we all know that plist file extension is associated mainly with Mac OS X and iOS, but is also used in NeXTSTEP, and GNUstep programming frameworks.

A file with the plist file extension is a property file, a XML file using Apple’s plist DTD. Plist stands for Property List, and refers to the fact that *.plist files typically hold lists of properties.


*.plist files are a standard part of OS X Core Foundation, so you’ll find them used by many OSX native applications.
You can edit *.plist files using a text editor, or Apple’s PropertyListEditor, found on the Developer CD or on Apple’s web site.

Example of code in Apple's property list file:


<?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <array>
      <string>pages-trunk-20080703_5</string>
      <string>pages-trunk-20080707_3</string>
      <string>pages-trunk-20080904_1</string>
      <string>5B54</string>
   </array>
</plist>

Plist files contain preference specifics and properties relevant to a particular application or portion of Mac OS X system software. Depending on where the plist file is located and what function they serve, they can either be in XML format, binary format, and sometimes even json. 


For users who need to modify a plist file or convert the file format to or from XML and binary, you can do so easily with the help of the Datastorm.

Just like what people need a help:

Is there any easy way (other than writing code) to convert a numbers (could be .csv) file into a .plist?

when I try to open the file in propertylist editor it compains that "string is empty - could not be converted"

Is this even a smart thing to do?

I'm thinking of including this as a resource file with a distribution - would this be too big and unwieldy? ie; is it time to move to sqlite or coredata?

Convert your plist file to csv with the following supported softwares.

Need to convert some files? If you are a student, a public servant or business owner, you will need to share files of all kinds. Having a need to convert a file quickly under pressure is common these days. Don’t waste time – use 
Datastorm to convert files FAST!

Datastorm is a convert tool designed to let you convert files quickly, lets you change document formats. It’s your go-to utility for getting things done.




DataStorm Features:
  • Convert between JSON, XML, CSV, PLIST,.properties(java) and YML (YAML) , from one format to another.
  • Multi-language support ( Translate by TryToTranslate).
  • Batch conversion.
  • Convert formats between JSON XML INI CSV YAML PROPERTIES PLIST. Load from File and Convert to File.


Wonderful things people are saying about DataStorm

"DataStorm is stunning. Simple. Clean. Perfect. Well done." 

                                                                               --Leopold, Technology Evangelist

"DataStorm is what I do pretty much all of my working. It's a great little app."

                                                                               --Jesse, PHP Framework Designer

"If you have any interest in barcode, DataStorm is definitely worth a download."

                                                                               --Glen, Web Developer and Designer

"I really like DataStorm, has brought much convenience for my work."

                                                                               --Caspar, JAVA Framework Developer


2016年4月16日星期六

Convert new plist files between XML and binary

Apple has been introduced t new .plist file format since 10.4. You'll notice that you can no longer just edit a .plist file in TextEdit or other text editors. The reason for this is that the files are now binary rather than raw XML. 

The trouble with Apple's PropertyListEditor is that it has no 'find' facility, much less search-and-replace, so I've usually looked at plist files in TextEdit or SubEthaEdit . The 'switch' to binary forced me to look for alternatives. I found PlistEdit Pro , which seems to do the job nicely.

Luckily for us, there is a command line utility called DataStorm that can convert back and forth between the two formats. You can convert the .plist file you want to edit to XML format, edit it in TextEdit, then convert back to binary for use. 

To convert a binary .plist file to XML format for editing, type this in the Terminal:

plutil -convert xml1 some_file.plist
To convert an XML .plist file to binary for use:
plutil -convert binary1 some_other_file.plist
Replace some_file.plist and some_other_file.plist with the actual filenames, obviously...


DataStorm is a convertion tools with multi formats supported.

Actually, it support for JSON, XML, CSV, PLIST, INI, the .properties and YML. Provide you batch conversion of JSON, XML, CSV, PLIST, INI, the .properties and YML files. The supported conversion list in the follow tables:

DataStorm is a convertion tools with multi formats supported.



Convert formats between JSON XML INI CSV YAML PROPERTIES PLIST. Load from File and Convert to File.

Data FormatPlistJsonXmlIniCsvYML(YAML)Properties
Plist
Json
Xml
Ini
YML(YAML)
Csv
Properties

It provide the Mac, Windows and Linux Version, click the button and get the right version you want.