Results 1 to 3 of 3

Thread: JSON Schema for validation

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Location
    Colorado Springs, CO
    Posts
    52

    Default JSON Schema for validation

    Hello all,

    I have an app that is used to track products. Each of these products has an associated product configuration that is used to define actions a product can take and thresholds for usage, price, etc. Currently each of these products has an associated configuration that is stored as JSON object. What I would like to do is create a product configuration "template" in JSON that can be used to "validate" that a product and its configuration is created correctly. Does any one know a good way to do this? It would be nice if this template could define the type a product config attribute should be and possibly other conditional checks for things like must be present or can not be 0 etc. I've been messing around with this and I'd like to come up with something clean. Is there such a plugin that exists that you can look at a JSON object and compare it with a template and tell if it is "valid"?

    Extjs 4.2

    Thanks for all the help in advance,
    Michael

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Location
    Colorado Springs, CO
    Posts
    52

    Default

    Little bit of research and I found: http://json-schema.org/ Looks promising incase anyone else is looking for json validation tools.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Location
    Colorado Springs, CO
    Posts
    52

    Default

    Looks like you can also use Model Validations: http://docs.sencha.com/extjs/4.2.1/#...fg-validations

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •