Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  18] [ 2]  / answers: 1 / hits: 15410  / 9 Years ago, sun, may 31, 2015, 12:00:00

During Laravel installation, I ran into Composer and JavaScript Object Notation (JSON) format.



I was wondering whether alternatives to this format exist, that have the same string - value system?


More From » json

 Answers
30

There are stacks of data formats that can represent data in the same way as JSON.



JSON happens to be the one that's found the most widespread acceptance, but there are plenty of others.




  • YAML uses indentation instead of braces to show nesting levels. It gives about the same features as JSON, but is intended to be more readable.

  • XML uses angle-brackets in the same way as HTML. Thanks to attributes, you can have more complex data than just simple string-value pairs. But it is less readable.

  • CSV is commonly used to import data into spreadsheets. The string-value pairs can be represented by a header row in the data.



And there's plenty of others, both standard and proprietary. You can even make up your own; as long as you can read and write it, it's a perfectly good data format. There's no right or wrong choice. But the best solution is generally to stick with the most common ones, as they'll have that much more support in the languages you're working in, and there will be more resources available for you to learn from. For my money, that makes JSON a clear winner.



In any case, when it comes to using a third-party product like Composer, you're kinda forced to use the data format of their choice, which in this case is JSON.


[#66394] Thursday, May 28, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jacie

Total Points: 490
Total Questions: 111
Total Answers: 105

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;