JSON has become a popular alternative to XML for a few reasons. It’s not as robust, which on the surface might not seem like a good thing. However, it’s simplicity makes it easier to implement and easier to read. While JSON supports fewer data formats, it supports the formats most critical to developers, excluding some potentially malicious data formats, such as executables. JSON data is stored in arrays and records, as opposed to XML which uses a tree structure for data. Since arrays and records are a component of object-oriented languages, sharing data with these languages is much easier. XML’s richness still offers a lot of benefits, but it ultimately up to the developer to decide which method for sharing data is right for their project. Encoding.com supports either decision!
For the Encoding.com API, here’s what you need to know. When making requests via JSON, your responses will be returned via JSON as well. We’ve updated all of the code snippets in the API docs with the JSON format. Output for both platform status and the notification system can be JSON formatted.
To make a status request, simply use the following:
The response should be formatted like this:
"status": "Current system status",
"status_code": "Current system status code.",
"incident": "Current incident description, if system is not at Ok condition. See description below"
JSON can also be specified as the callback format for notifications. Just use the following:
Have more questions about using our API? Contact us for a free consultation, or better yet, sign up for a forever free 1GB monthly account. Let us know what you think in the comments!