You're Using JSON, Why not MessagePack?
11–20 of 66 posts
Re: You're Using JSON, Why not MessagePack?
#12because when JSON is Gzip'd there's only around ~5% in it: http://goo.gl/b2Uur (the bit on geojson).
Re: You're Using JSON, Why not MessagePack?
#13Because it isn't human readable, which will make debugging it far less convenient than glancing at some JSON in a browser (or in Firebug).
Re: You're Using JSON, Why not MessagePack?
#14Re: You're Using JSON, Why not MessagePack?
#15I'm working on a Protocol Buffer library that can serialize/deserialize to either JSON or Protocol Buffers. That way you can do all your development with JSON, but if you ever find you need the efficiency improvements of a binary format, you can just change your Serialize() call.
Having a .proto file gives you the benefits of something like JSON Schema: a place to document all your fields and what they mean, and a few very simple validation constraints like the expected types.
Re: You're Using JSON, Why not MessagePack?
#16* It does not support our languages. Is there a Ruby module with no C extension? A C# library? Lua? What about that really cool language coming out next week? What about C?
* Even if it does, why have to deal with someone else's poor API design? JSON has a million parsers for everything, and if by chance you don't like any of them, you can write another one in about two hours.
* It's not human-readable. Enough said.
* It's smaller than JSON, sure, but is it smaller than gzipped JSON? PB's aren't for our purposes. Neither are TNetstrings. This might be, I haven't checked, but I doubt it.
Re: You're Using JSON, Why not MessagePack?
#17For the same reasons we are in the process of switching from Protocol Buffers back to JSON: * It does not support our languages. Is there a Ruby module with no C extension? A C# library? Lua? What about that really cool language coming out next week? What about C? * Even if it does, why have to deal with someone else's poor API design? JSON has a million parsers for everything, and if by chance you don't like any of…
Why is the "with no C extension" part important to you?
Re: You're Using JSON, Why not MessagePack?
#18For the same reasons we are in the process of switching from Protocol Buffers back to JSON: * It does not support our languages. Is there a Ruby module with no C extension? A C# library? Lua? What about that really cool language coming out next week? What about C? * Even if it does, why have to deal with someone else's poor API design? JSON has a million parsers for everything, and if by chance you don't like any of…
> Is there a Ruby module with no C extension? Why is the "with no C extension" part important to you?