JSON Consumption – DOM vs Binding vs Streaming

DOM: JSON is consumed at once, and user can navigate the JSON object via function calls

  • Good for large, unpredictable, infrequent data
  • Overkill for smaller amounts of data
  • Can use too much memory, and time to load into memory, for more frequent data

Binding: JSON is consumed at once into programming language object

  • Good for small amounts of predictable data
  • Unpredictable data can result in parsing failures, if not versioned properly

Streaming: JSON is consumed as data is read

  • Good for larger, more frequent incoming data
  • Coding is more complicated, overkill for smaller, more infrequent data

Leave a Reply