Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 825 Bytes

notes_on_json.md

File metadata and controls

25 lines (15 loc) · 825 Bytes

Notes on JSON

I have seen a wide variety of JSON uses and many uses do not utilize JSON to the extent possible, meaning addition work has to be done to interpret the JSON.

These are my rules of thumb for setting up a JSON structure.

  • Use booleans, where this makes sense
  • Use numbers, for things that require calculation
  • Use strings for everything else

Booleans

Numbers

The case for using numbers over strings, is often that I see what should be numbers are represented as strings.

Strings

This rule of thumb is sort of the opposite of the two rules above. Use strings.

Resources and References