Json diagram : Is there a way to embed subobjects instead of connecting them with an arrow?

0 votes
asked Mar 8, 2021 in Question / help by Jonathan Vika
Currently a JSON diagram will create a new table for an object definition and then connect it to the attribute by an arrow.
I would like to have those tables embedded in the right cell of the attribute instead of having a line and an arrow pointing to the external box.
commented Mar 9, 2021 by chris (1,740 points)

I don't think this is currently possible, but what would it look like with more than two levels in your hierarchy? The boxes would look quite odd quite fast....

As a workaround I tried to use a map, which if you use invalid json looks like it's trying to work, but throws a syntax error with valid json. JSON as an embedded diagram has only just been implemented (thanks to a suggestion by The-Lu) so potentially it will work soon.

commented Mar 10, 2021 by The-Lu (37,880 points)

Hello C.,

If you want that, it is necessary to put all on the same line...
But that is not so easy, if there are a lot of JSON to manage....

map "Embedded JSON on Map table" as mapper {
attribute => {{json\n{"this":"that","fgd":"sdf"}\n}}
name => value

If that can help,

1 Answer

0 votes
answered Mar 10, 2021 by Jonathan Vila
Sounds very interesting @the-lu , thank you.

Can I also add another embedded JSON in the "sdf" cell ? As 1 level on embedding this approach is great, but , can I do several embedding levels with this approach ?
commented Mar 10, 2021 by The-Lu (37,880 points)

Hello J.,

Unfortunately, we cannot yet include sub-JSON in JSON (the JSON must stay JSON)...

Only sub-JSON on Map table:

Therefore your Question/help will be a wanted functionality, and stays active.