Coder Social home page Coder Social logo

json-rnc's People

Contributors

lapalme avatar rali-udem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

json-rnc's Issues

example file does not validate

Hi,
I pasted the sample book JSON-RNC schema into book.json-rnc and the same booklist file into booklist.json and got the errors below (nothing validated, and it did not find the start of the schema). I ran Src/ParseJsonRnc.py which showed the JSON Schema I would have expected (also below).

$ Src/ValidateJsonRnc.py book.json-rnc booklist.json
Item 1: bad json object:Expecting object: line 1 column 28 (char 27)
Item 2: bad json object:Extra data: line 1 column 10 - line 2 column 1 (char 9 - 32)
Item 3: bad json object:Extra data: line 1 column 21 - line 2 column 1 (char 20 - 39)
Item 4: bad json object:Extra data: line 1 column 19 - line 2 column 1 (char 18 - 37)
Item 5: bad json object:Extra data: line 1 column 21 - line 2 column 1 (char 20 - 26)
Item 6: bad json object:Extra data: line 1 column 20 - line 2 column 1 (char 19 - 43)
Item 7: bad json object:Expecting object: line 1 column 37 (char 36)
Item 8: bad json object:Extra data: line 1 column 21 - line 2 column 1 (char 20 - 28)
Item 9: bad json object:Extra data: line 1 column 21 - line 2 column 1 (char 20 - 47)
Item 10: bad json object:Extra data: line 1 column 18 - line 2 column 1 (char 17 - 27)
Item 11: bad json object:Extra data: line 1 column 20 - line 2 column 1 (char 19 - 43)
Item 12: bad json object:Extra data: line 1 column 21 - line 2 column 1 (char 20 - 25)
Item 13: bad json object:Extra data: line 1 column 23 - line 2 column 1 (char 22 - 134)
Item 14: bad json object:Extra data: line 1 column 19 - line 2 column 1 (char 18 - 35)
Item 15: bad json object:Expecting object: line 1 column 25 (char 24)
Item 16: bad json object:Extra data: line 1 column 10 - line 2 column 1 (char 9 - 15)
Item 17: bad json object:Expecting object: line 1 column 33 (char 32)
Item 18: bad json object:Extra data: line 1 column 9 - line 2 column 1 (char 8 - 20)
Item 19: bad json object:Expecting object: line 1 column 31 (char 30)
Item 20: bad json object:Extra data: line 1 column 9 - line 1 column 18 (char 8 - 17)
20 objects read: 0 invalid, 20 bad, 0 with duplicate fields


{"$schema":"http://json-schema.org/draft-04/schema#",
"definitions":{"Book":{"properties":{"$id":{"type":"string"},
"ISBN":{"type":"string"},
"author":{"type":"string"},
"number":{"type":"integer"},
"subtitle":{"type":"string"},
"title":{"type":"string"},
"type":{"$ref":"#/definitions/BookType"},
"weight":{"type":"number"}},
"required":["title","author","ISBN","weight","type"],
"type":"object"},
"BookList":{"properties":{"books":{"items":{"$ref":"#/definitions/Book"},
"type":"array"},
"owner":{"type":"string"}},
"required":["books","owner"],
"type":"object"},
"BookType":{"oneOf":[{"pattern":"Paperback",
"type":"string"},
{"pattern":"Hardcover",
"type":"string"}]},
"Store":{"properties":{"name":{"type":"string"},
"url":{"type":"string"}},
"required":["name","url"],
"type":"object"},
"start":{"items":{"oneOf":[{"$ref":"#/definitions/BookList"},
{"$ref":"#/definitions/Store"}]},
"type":"array"}},
"description":"Written: 2017-08-18 16:18",
"items":{"oneOf":[{"$ref":"#/definitions/BookList"},
{"$ref":"#/definitions/Store"}]},
"title":"Created from JSON-RNC: book.json-rnc",
"type":"array"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.