Book a Demo

Author Topic: Schema Composer and JSON  (Read 5156 times)

philchudley

  • EA User
  • **
  • Posts: 746
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Schema Composer and JSON
« on: March 16, 2020, 09:11:13 pm »
Hi All

This maybe a basic question, but on Page 7 of the resource document found here

https://www.sparxsystems.com/resources/user-guides/15.1/model-domains/schema-models.pdf

The wording states that the Schema Composer can help you build JSON definitions, but as far as I can tell nowhere in the document states how you can define JSON or generate a JSON definition file.

So how do you generate a JSON definition using the Schema Composer? Is it a built in functionality or is scripting / add-in required?

All help as usual very much appreciated.

The obvious follow-up would be, is it possible to import a JSON file into EA directly (using schema composer?) or is a script / add-in required.

I am using the latest (28 Feb 2020) build of EA 15.1

Thanks and all the best

Phil
Models are great!
Correct models are even greater!

philchudley

  • EA User
  • **
  • Posts: 746
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Schema Composer and JSON
« Reply #1 on: March 16, 2020, 10:10:44 pm »
Hi All

I have worked out how to generate JSON, obvious really once you know where to look! (Create a CIM Schema and select JSON upon Generate)

But still have not found JSON import, guess that's not possible at the moment

All the best

Phil
Models are great!
Correct models are even greater!

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1163
  • Karma: +30/-8
    • View Profile
Re: Schema Composer and JSON
« Reply #2 on: March 17, 2020, 09:57:04 pm »
[SNIP]
But still have not found JSON import, guess that's not possible at the moment
Sparx does not reverse engineered JSON, it would be nice if it could. The problem with reverse engineering JSON is what language do you choose for your reverse engineered class model.

if you have JSON schema and it is not too complex you could always try to manually create a class model mirroring the schema, use schema composer to create a JSON schema from the class model, and compare both JSON schemas to see ho close they are.

philchudley

  • EA User
  • **
  • Posts: 746
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Schema Composer and JSON
« Reply #3 on: March 17, 2020, 10:07:10 pm »
Thanks for the response, that confirms what I suspected.

Thanks for your suggestion for the reverse engineering I'll give that a go

All the best

Phil
Models are great!
Correct models are even greater!