Author Topic: JSON Importer?  (Read 23176 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
JSON Importer?
« on: March 07, 2017, 05:42:35 pm »
I know EA can generate JSON, but is there a way to import JSON directly into EA?

Can it be done indirectly (e.g. JASON -> XSD -> EA)?  If so, what tools are recommended?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: JSON Importer?
« Reply #1 on: March 07, 2017, 05:57:32 pm »
You could write one yourself.
We've done some work on parsing source files and translating them to EA elements recently (all open source) for DDL (part of of the EA Database Transformer and Cobol copybooks (part of the EA Mapping addin

It should be pretty easy to extend that for the JSON syntax.
See
- https://github.com/GeertBellekens/cobol-object-mapper
- https://github.com/GeertBellekens/DDL-Parser

Both are based on the generic Human Parser Generator

Geert

PS. Or yo can of course outsource the development to my company, I'd be happy to provide you with a quote for a JSON parser  ;)



Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: JSON Importer?
« Reply #2 on: March 08, 2017, 09:09:49 am »
No, I'm not aware of anything to import JSON into EA.

Given your comment about transforming to XSD and then importing, can I assume that you are in fact referring to a JSON schema?

Not sure about JASON, can't find anything that seems relevant on that. I know our schema composer generates JSON Schema files. So at least that would be a candidate for importing.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: JSON Importer?
« Reply #3 on: March 08, 2017, 09:40:02 am »
No, I'm not aware of anything to import JSON into EA.

Given your comment about transforming to XSD and then importing, can I assume that you are in fact referring to a JSON schema?

Not sure about JASON, can't find anything that seems relevant on that. I know our schema composer generates JSON Schema files. So at least that would be a candidate for importing.
Yes, Simon,

I WAS referring to a JSON schema (I believe). As you might tell, my knowledge of JSON is limited.  We've been provided with some REST APIs with JSON definitions and are wanting to import them into EA.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: JSON Importer?
« Reply #4 on: March 08, 2017, 03:10:03 pm »
Ah, the standard requirements management issue. Getting to know what users need without them knowing themselves.

Stepping beyond the JSON, what you're probably after is a model of the REST api and not just the schema of each request and response. If it's well designed, all of those requests and responses probably take the form of subsets of a core data model for the service. In that case the ideal would be to import schema composer profiles, the base data model, and a list of each request path and the possible response types (including http status codes)

 It's a request I have seen before, but there's nothing built in to EA to do it.

PS. JSON is like this... XML is too complicated. Let's make a new format that's easier to read and doesn't have all those nasty schemas etc. A few months later... How can we specify what we expect in a JSON message? Let's create a way of specifying that. A few years later... JSON is too complicated.  :-X

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: JSON Importer?
« Reply #5 on: March 08, 2017, 05:59:58 pm »
[SNIP]

PS. JSON is like this... XML is too complicated. Let's make a new format that's easier to read and doesn't have all those nasty schemas etc. A few months later... How can we specify what we expect in a JSON message? Let's create a way of specifying that. A few years later... JSON is too complicated.  :-X
Yes, I'd already gathered that!  ;)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: JSON Importer?
« Reply #6 on: March 08, 2017, 06:06:35 pm »
Stepping beyond the JSON, what you're probably after is a model of the REST api and not just the schema of each request and response. If it's well designed, all of those requests and responses probably take the form of subsets of a core data model for the service. In that case the ideal would be to import schema composer profiles, the base data model, and a list of each request path and the possible response types (including http status codes)

 It's a request I have seen before, but there's nothing built into EA to do it.
These are 3rd party product developers.  Data model?  What's a data model?  They can't even give me a CSV of the REST APIs.  All they can give me is a Swagger JSON output file.

Any other options to get that into EA?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: JSON Importer?
« Reply #7 on: March 09, 2017, 07:55:06 am »
PS. JSON is like this... XML is too complicated. Let's make a new format that's easier to read and doesn't have all those nasty schemas etc. A few months later... How can we specify what we expect in a JSON message? Let's create a way of specifying that. A few years later... JSON is too complicated.  :-X

The phrase I have heard most often is "we had xml serialization issues, so we switched to json".

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8066
  • Karma: +118/-20
    • View Profile
Re: JSON Importer?
« Reply #8 on: March 09, 2017, 09:03:19 am »
All they can give me is a Swagger JSON output file.
Yep. Had several requests for import of swagger files. Seems to be pretty common for developers of REST APIs.

PS. Incidentally, swagger isn't in JSON although it often embeds it, the base format is in fact YAML.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: JSON Importer?
« Reply #9 on: March 09, 2017, 09:43:54 am »
All they can give me is a Swagger JSON output file.
Yep. Had several requests for import of swagger files. Seems to be pretty common for developers of REST APIs.

PS. Incidentally, swagger isn't in JSON although it often embeds it, the base format is in fact YAML.

And YAML is a human readable format. (or should be)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: JSON Importer?
« Reply #10 on: March 09, 2017, 10:35:31 am »
All they can give me is a Swagger JSON output file.
Yep. Had several requests for import of swagger files. Seems to be pretty common for developers of REST APIs.

PS. Incidentally, swagger isn't in JSON although it often embeds it, the base format is in fact YAML.
As I said, my knowledge of JSON is extensive (ly lacking). ;)

Should I submit a formal request, since it does seem to be increasingly common or is it already in the pipeline due to previous requests?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: JSON Importer?
« Reply #11 on: May 11, 2017, 11:59:40 pm »
Paolo, what's the status about this?

I'm dealing with the same problem  :)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: JSON Importer?
« Reply #12 on: May 12, 2017, 09:37:57 am »
Hi Matthias,

No real progress that I'm aware of.  It would not hurt for you to put in a formal feature request also.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

PhilippeWolkowicz

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: JSON Importer?
« Reply #13 on: January 18, 2019, 06:57:49 pm »
is there anything new regarding this subject? Did somebody work on a solution?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: JSON Importer?
« Reply #14 on: January 18, 2019, 07:43:42 pm »
@Philippe You should stick with Geerts suggestion: write your own. I guess it would not take me longer than 15 minutes with a basic Python script.

q.