Tag Archives: JSON

XML vs. JSON vs. YML

Here is a side by side comparison of the same data presented in three common formats.  How do they compare?  What are they good for?

Posted in Coding, Design | Tagged , , , , | Leave a comment

Ultimate Java Exception Class

This is the third in a series about translatable exceptions (see Translatable Error Messages).  This post is about the class JSONException which contains the required features.

Posted in Coding, Design, Uncategorized | Tagged , , , | Leave a comment

Exception Receiving

When you make a web service call, you want to report the problem to the user save as you do for any other part of the program, and that is through an exception object.  This post talks about converting the … Continue reading

Posted in Coding, Design | Tagged , , , | 1 Comment

JSON Translatable Error Messages

Second in a series on translatable exceptions, this discusses how an error message should be returned as JSON from a web-service API so that it the calling program can display the error in the right language for the user.

Posted in Coding, Design, Uncategorized | Tagged , , , | 2 Comments

Prefer JSON over XML for Data Structures

If you are going to exchange data structures between programs you have many choices.  Of these, JSON is the best choice in general, and specifically a better choice than XML, and this post explains why.

Posted in Design | Tagged , , | Leave a comment

Create-On-Update Pattern for AngularJS Applications

This is a suggestion for how to design the JSON/REST protocol between the Angular application and the server, to handle creation of items easily and conveniently.  Use a special ID value to indicate that the object does not exist on … Continue reading

Posted in Coding, Design | Tagged , , , | Leave a comment

JSON/REST API – Handling Dates

In this post, I lay out the reason that you should always transfer dates in a JSON/REST API as an integer epoch value: the number of milliseconds since Jan 1, 1970. If you think it should be anything else, please … Continue reading

Posted in Coding, Design | Tagged , , , , , , | Leave a comment