Solved

Drawings to depict JSON-to-JSON mapping


Badge +1

I need to depict complex JSON transformations, so that we can track specific fields as they move from UI to API call to backend service to database.  It’s almost a sequence diagram, but what I really need to represent is how data flows from one layer to another through differently shaped payloads.

One of my concerns is the complexity of the JSONs and how deeply nested some structures are.

Are there any examples, templates, or articles that discuss how to do this?  I am barely experienced with Lucid, so any advice would be appreciated.  For example, is it possible to expand and collapse portions of the JSON?  Can connectors be drawn from field to field, so that they stay connected during the development of the diagram?  Are there tools better suited to this use case?

icon

Best answer by Eric R 4 July 2024, 18:13

View original

Comments

Badge +1

One other thing, and it’s a longshot…  Is it possible to paste a JSON string into a drawing and have it turn into a structured entity?  Highly unlikely, but I had to ask.

Badge +1

Did I select the wrong group to post this question?  Would it be more appropriate in Lucid for Developers or somewhere else?

Userlevel 4
Badge +6

Hi @LeeAtNM thanks for your post!

Your use case does not sound like something we have in our template gallery. Looking at your different questions separately, it looks like we do offer all the features you describe: 

  • Is it possible to expand and collapse portions of the JSON?

    You can make use of the layer and shape actions features to achieve this. By assigning specific shapes to specific layers, and then assigning the “Toggle Layer” shape action to a different shape, you can show and hide the corresponding layer and all the shapes assigned to it with the click of a button. For more information, please read through the Layers article, as well as this section of the Shape Actions article in our Help Center. See below a quick demo of this: 
     


     

  • Can connectors be drawn from field to field, so that they stay connected during the development of the diagram?

    By default, lines stay attached to the shapes they are connected to, even when moving those shapes:

     


     

  • You can also upload a JSON file to generate a diagram via our API. Please read through this section of our API documentation for more information on this and let me know if this is what you are looking for. Please note that the Lucid Developer Tools are only available on Team- and Enterprise-level accounts. 

 

Hope this helps! Let me know if you have any additional questions! 

Reply