Question

Json Response

  • 1 April 2024
  • 8 replies
  • 112 views

Badge +2

Currently we are using LucidChart for drawing fencing diagrams. We had some questions about the Json response that we get for Get Document contents. There is some data that raised a question for us. Our overall fencing diagram through lucid allows us to drop and drag gates and overall measurements for these fences and those are pulled in through the api. Some of the gates are showing up as ERRORS! within the Json response. Also the Lines class within our json response seems to be connected to these ERROR!. We were wondering if you can provide some insight on this, I will provide an example snippet of a Json response for a better understanding. 

 

 

 

Json: 

 

{

    "id": "f48e1227-c6df-4f9b-ad00-20a81c271d26",

    "title": "SITE-000000015",

    "product": "lucidchart",

    "pages": [

        {

            "id": "0_0",

            "title": "Page 1",

            "index": 0,

            "items": {

                "shapes": [

                    {

                        "id": "igj.W1Apzw4F",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "4SjbGdW8LA_Y",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "mn4ojKrZE2kh",

                        "class": "fpDoor",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "I.zWhy0nRL8n",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "mn4op5Zj~F~_",

                        "class": "fpDoor",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "ngj.hkVk9hL7",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "tn4o~8~AbrX3",

                        "class": "fpDoor",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "~qib73wv5_Ot",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "51-.p..asv~N",

                        "class": "fpWall",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "21'11\""

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "gQGlIjU5_0G9",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "eQ3o3X2kLgMt",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "utc0BsoVG~he",

                        "class": "fpWall",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "22'6\""

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "luc0qQK2_fu2",

                        "class": "fpWall",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "9'9\""

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "_UGlehELJdOF",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "lVGlo3jH9CUC",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "bm4ohaAS60RG",

                        "class": "fpDoor",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "V.3oZ9YDvkZw",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "~PGlPYs6Ok-S",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "#ERROR!"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "bm4o5dWoX5DO",

                        "class": "DefaultSquareBlock",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "6.666666662500001"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "5tc0LGr5jCOP",

                        "class": "fpWall",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "22'8\""

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "vQdbGMOuXD7m",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "kgj.hE8E9YJL",

                        "class": "SVGPathBlock2",

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "rtc05gROqC2Q",

                        "class": "fpWall",

                        "textAreas": [

                            {

                                "label": "Text",

                                "text": "10'"

                            }

                        ],

                        "customData": [],

                        "linkedData": []

                    }

                ],

                "lines": [

                    {

                        "id": "HQGlK94bRX3v",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": null

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "_UGlYy-deN3w",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "_UGlehELJdOF"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "lVGlKPwwBpjQ",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "lVGlo3jH9CUC"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "V.3oGaCPIJGp",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "V.3oZ9YDvkZw"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "bm4o_-QQe-7V",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "bm4o5dWoX5DO"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": "bm4ohaAS60RG"

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "gQGlVWbGkXWq",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "gQGlIjU5_0G9"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "~PGlc3U4~ZuG",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "~PGlPYs6Ok-S"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    },

                    {

                        "id": "eQ3oEZX4eaN_",

                        "endpoint1": {

                            "style": "None",

                            "connectedTo": "eQ3o3X2kLgMt"

                        },

                        "endpoint2": {

                            "style": "Arrow",

                            "connectedTo": null

                        },

                        "textAreas": [],

                        "customData": [],

                        "linkedData": []

                    }

                ],

                "groups": [],

                "layers": []

            },

            "customData": [],

            "linkedData": []

        }

    ],

    "data": {

        "collections": []

    }

}


Comments

Badge

Hey arajN2, I’m Alec Bingham, I’m one of the developers that maintains Lucid’s REST API. Those `#ERROR!` messages seem consistent with problems occurring either with custom data, or with formulas. Do you make use of either of these features on your documents?

Badge +2

Hello Alec, 

Thanks for answering the question. To give you a better overall knowledge, the class that holds the ‘ERROR!’ message, is happening whenever we place a fence gate within our drawing within Lucid. Those ‘ERROR!’ messages are only appearing when a new gate is being added to the overall drawing, I will include a picture below that could help with understanding.  

 

This is the overall image that holds each specific measurements, with the 2’8’’ being the actual gates. I will also include another image that shows the overall measurements. 

 

Userlevel 3
Badge +7

Hi @arajN2, my name is Richard and I’m working with Alec to see if we can sort-out this error you’re having. Can you please get back to us on the following?

  • We suspect the interaction of the house shape and the wall shape (on the north end of your diagram) may be the issue. To troubleshoot could you please try slight adjustments with the locations/overlap of those elements to see if it resolves the Errors?
  • What is “LucidChart Flow Actions”? It looks like this may be a screenshot from the output of a cell in your IDE, is that right?
  • Lastly, could you please provide a support PIN for the document so that our team can take a closer look?
Badge +2

Hi Richard, Thanks for answering back on the previous post. To answer your questions,

  •  I tried slightly adjusting those elements but it seemed to give the same error as before
  • We currently are using the developer console within Salesforce, which has the API integrations coming in from AWS and from that we are using LucidChart to generate these sketches 
  • The support Pin is zsiAV40xBJMa

 

 

Userlevel 3
Badge +7

@arajN2 Thanks for the info! I’ve pinpointed this #ERROR in your example with the “DefaultSquareBlock”s which are nearly invisible on your example diagram. The “DefaultSquareBlock”s contain just a formula that is returning #ERROR and this means there’s no text displayed, hence why they’re invisible on your canvas! The “text” for the “DefaultSquareBlock” shape in your JSON will continue to show “#ERROR” until the formula error is resolved inside your document.

 

Knowing the Shape ID for any shape on your Lucid document can help you match the shape on your canvas with the corresponding shape object in your Document Contents Resource (JSON returned from GET Document Contents request). It’s helpful to know that you can inspect the shape ID for any item in your document by using this formula: =LABEL(THIS) 

 

 

To address the “#ERROR”s in your JSON you must solve the formulas to no longer return errors. I’m happy to help! To start, I recommend reviewing our Formulas documentation.

 

 

If you have any questions, please help me understand what you’re attempting to accomplish with this formula.

Badge

There are some elements marked "#ERROR!" in your JSON response, which may indicate problems with the data or its processing. These errors may be caused by incorrect or missing data in your fencing diagram. Additionally, the Lines class associated with these errors may also be affected by the issue. To more accurately analyze the problem, you may need additional information about the data structure and requirements of the LucidChart API.

Badge +2

Hello, 

Sorry for the delay, was out for a bit, but getting back to this issue. I had another question as I was looking through this document. We are currently using gate shape that is being placed against walls. Usually when placing a gate on the drawing, it breaks up the wall into measurements accounting the gate in it as well. The gate seems to be splitting at certain walls but not others. I will include screenshots that will also help clarifying. Within the screenshot, you can see how the lower gate is breaking up the measurements while the upper wall isn’t breaking up when the gate is placed, it remains 9’9”. 

 

I will also include a support pin: BLninStYGMN6

 

Thank you,

Araj

Badge

Hey Araj,

If you right click on the wall shape, there should be menu option labelled ‘Wall Options’. From there, you can choose to display the total length (like the top of your example), a split length (like the bottom of your example), or hide the measurements entirely.

Hope this helps!
- Alec

Reply