Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JSON, just use JSON. Or XML, if you don't like JSON.


JSON brings its own set of problems. for example, look at the python generated JSON below.

    >  >>> json.dumps({ "X" : 1 << 66 })
    > '{"X": 73786976294838206464}'
What's the parsing result in javascript ? What's the parsing result in Java ?


What's the difference to CSV?

  number,73786976294838206464


For CSV, I don't know how this comes out. It depends on the library/programming language. It might be 73786976294838210000 or it might throw an exception, or whatever. I'm just saying JSON will not solve your problems neither.


So it always depends on the implementation.

If you need something unambiguously specified, then XML with XSD is still a valid option. All number types are specified exactly, and you can use extensions for custom number types.


what's wrong with protobuf & friends ?


Nothing. Not a very good data exchange format though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: