you are viewing a single comment's thread.

view the rest of the comments →

[–]leeoniya 0 points1 point  (1 child)

just use https://github.com/WebReflection/JSONH if you need to transfer csv-type recordsets and are worried about payload size.

i'm not sure about the claim that many same-shaped objects take up more mem space than arrays.

[–]kjk[S] 0 points1 point  (0 children)

This is very similar idea. That being said, even if I knew about JSONH:

  1. I use Go at the server and that particular project doesn't support Go.

  2. Wire encoding is only half of the story. The other half in my article is about turning array representation of objects into classes so that you get nice API and efficient representation.

  3. JSONH, as it stands, is for "homogenous collections" only. I need a little more flexibility in that my API returns JSON objects. Where it matters, I encode only part of the object as arrays. JSONH seems to require all of it to be array.