Questions tagged [json]

JSON (JavaScript Object Notation) aka the Fat Free Alternative to XML is a lightweight data exchange format inspired by JavaScript object literals. It is often used with JavaScript, Ajax, and RESTful web services but is completely language independent.

JSON (JavaScript Object Notation) is a lightweight data exchange format and is often used with and RESTful .

JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.

JSON is built on two structures:

  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages is also based on these structures.

Its syntax was inspired by a subset of the JavaScript object literal notation.

{
    "names": { "first": "John", "last": "Doe" },
    "languages": [ "javascript", "python", "lisp" ]
}

JSON is not the same thing as JavaScript object literals. Rather, JSON is a common technique to serialize from and deserialize to JavaScript's (and other languages') objects.

Useful links:

Browser Addons

357 questions
43
votes
4 answers

What JSON structure to use for key value pairs?

What JSON format is a better choice for key value pairs and why? [{"key1": "value1"}, {"key2": "value2"}] Or: [{"Name": "key1", "Value": "value1"}, {"Name": "key2", "Value": "value2"}] Or: {"key1": "value1", "key2": "value2"} The first variant…
boot4life
  • 695
7
votes
2 answers

Are Unknown JSON Keys a Valid Approach to Sending Data?

There a lot's of SO questions asking "how" to get unknown JSON keys from a JSON object, and I've done it plenty of times, but after starting to use JSON schema to start designing API request and responses, I am starting to question if having unknown…
rhamilton
  • 189
1
vote
1 answer

Does a Form describing JSON "Standard" exist?

I joined a project were we sell services for different providers through web, iOS and android apps. I am working on iOS. I was ask to display a purchase form via a web view and react by what is entered natively. I do so by intercepting the network…
vikingosegundo
  • 307
  • 2
  • 9
0
votes
1 answer

Architecture question: Match addresses in different JSON schemas

I had to move houses recently and I found that it is tedious to check every potential place's broadband coverage. For that reason I want to build a website where you can check which broadband options are available at a specific address. I have…
btzs
  • 101
0
votes
3 answers

Dealing with API rate limits

I've been using a simple json to the steam API to get player inventory, but now I have discovered that steam impose a rate limit to the number of requests allowed. A rate I feel is not enough for my requirements. Are there any programming techniques…
Nedas
  • 131
0
votes
2 answers

How to handle translations in JSON?

I am wondering what would be the most appropriate method to handle translations in JSON files in terms of arrays and objects. Considering an object has properties related to itself, is a translation a property or a completely different entity? In…
Vilarix
  • 109
  • 2
-1
votes
1 answer

What are "siblings" of .json files?

I was reading through the documentation for Bower here and I read this line: "The .bowerrc file should be a sibling of your project's bower.json." What does that mean exactly? Searching Google returned questions of people asking how to find…
mshindal
  • 117