Not all JSON parsers are required to support comments. The parser that
Avro Java uses (Jackson) does support comments and we enable that
feature, but I don't know about the parser for Python. However in
general one should probably not rely on comments working in JSON.
Doug
On 03/13/2011 03:01 PM, Saptarshi Guha wrote:
> Hello,
>
> I noticed that // and /* */ are valid comments. However, when commenting bits
> out
> I get an error, the following is valid JSON (I realize that it isn't a valid
> scheme right now)
>
> {
> "type": "record",
> "name": "FOOt",
> "namespace":"org.me.you",
> "fields" : [
> {"name" : "data" , "type": [ "aX1","bX2","cX3"]}
> // {"name" : "attributes" , "type": {
> // "type" : "map",
> // "values" : [ "aX1", "bX2", "cX3"]
> // }}
> ]
> }
>
> I get an Error parsing JSOn usning 1.6 Python bindings
> Uncommenting the region, it successfully parses but fails as an invalid
> schema (separate issue)
>
> Saptarshi
>