Date: 2017-04-06 09:14 pm (UTC)
From: [personal profile] sassa_nf
It's not about arrays with holes. JSON for them will have null instead of a hole. That's not the same as {0: 1, 2: 3}. Arrays have length and order of elements.

Maybe I am a bit slow, but yes, we can ascribe properties to certain objects. But you need to encode those properties so that you can restore them upon decoding. Like in JSON those properties are encoded by using square brackets. In a flat structure everything looks the same, so you need to invent markers, like extra constructed fields (length? plus _isArray?).

I recall what stunts people adopt to read a list of properties from Java's .properties files, which _are_ flat. :-)
Edited Date: 2017-04-06 09:21 pm (UTC)

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25 262728 2930 31

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 1st, 2025 08:43 am
Powered by Dreamwidth Studios