JSON is a great way to talk across languages and handle structured data. In addition, using a JSON document is a good mechanism for managing document-oriented information (also known as semi-structured data). Document-oriented databases, such as JSON documents, comprise one of the main categories of NoSQL databases, which have many practical applications.
So, when talking about the kind of values that JSON document supports…it’s essentially a format that works across multiple programming languages and has the flexibility to handle semi-structured data. Because of these factors, most requests and responses to and from Apache CouchDB (and IBM Cloudant) use JSON for formatting the content and structure of the data and responses. In Cloudant databases, the JSON object represents various structures, including all documents in a database.
Creating a database and adding documents is simple. See how to do it here.
Supported JSON Values
• If the argument cannot be converted into a number, it returns NaN.
• In a non-constructor context (i.e., without the new operator), Number can be used to perform a type conversion.
Strings hold data that can be represented in text form. A double quotation mark should enclose all strings. Strings support Unicode characters and backslash escaping.
• Checking the length or number of units in a string.
• Build and concatenate strings using the + and += string operators,
• Check for the existence or location of substrings with the indexOf() method,
• Extracting substrings with the substring() method.
Boolean returns a true or false value. You can use the Boolean() function to find out whether an expression (or a variable) is true.
A list of bracketed values. The enclosed values can contain any valid JSON. They are single objects that store multiple values in a list. In JSON, array values must be of type string, number, object, array, Boolean or null.
• Loop through an array and perform the same thing to every value within the array
A set of key/value pairs, such as an associative array, or a hash. The key must be a string, but the value can be any of the supported values.
• Compare if two values are the same value.