ObjGen Help - Live JSON Generator

The ObjGen Live JSON Generator allows the user to interactively shape, create and generate JSON structures and data. From a simple text model keyed in by a user, the JSON data dynamically generates each time the user changes the model.

Using a simple syntax and convention, a model can quickly be entered by the user to generate rich and complex JSON data.

Model highlights

  • JSON properties are defined by entering names
  • Data types are specified using a simple convention:
    • s (or string) = string, textual data
    • n (or number) = numbeical data
    • d (or date) = date/time
    • b (or bool) = booleans
    • [] = to define an array
  • Data types can be abbreviated since the first character is significant: str, num, bool, etc.
  • Complex types and data are created by nesting (or tabbing) new properties in a new level. For example:
   id n
   name s
   phones
      work s
      cell s
will generate:
{
   "id": 0,
   "name": "",
   "phones": {
      "work": "",
      "cell": ""
   }
}
  • Arrays are defined by using bracket syntax '[]'. For example:
   id n = 12123434
   name = Joe Rightsman
   address[0]
     street=100 East Main Street
     city=Southernville
     state=NY
     zip=19910
   address[1]
     street=100 West Birch Lane
     city=Northnville
     state=NY
     zip=19911
will generate:
{
  "id": 12123434,
  "name": "Joe Rightsman",
  "address": [
    {
      "street": "100 East Main Street",
      "city": "Southernville",
      "state": "NY",
      "zip": "19910"
    },
    {
      "street": "100 West Birch Lane",
      "city": "Northnville",
      "state": "NY",
      "zip": "19911"
    }
  ]
}
  • Assignments are defined by using the equal sign '='. For example:
   id n = 0
   name = Dave Kingman
will generate:
{
    "id": 0,
    "name": "Dave Kingman"
}
  • Any assignment for a property that does not include a data type, defaults to a string.
  • Dates values default to the current date, but can be assigned using a variety of parseable date values. For example:
id n = 0
name = Dave Kingman
dateOfBirth d = 2112/12/21
will generate:
{
    "id": 0,
    "name": "Dave Kingman",
    "dateOfBirth": "2112-12-21T05:00:00.000Z"
}

Copyright © 2017 Everett Ward Systems