Skip to main content
Oct 24, 2025 4:29 PM UTC
Solved

Using JSON Standard Import API, how to specify "text" for Container shape

Hi, 
I’m new to LucidCharts and am trying to use the JSON standard import API to create a diagram. 
I am able to upload the json file to see the rendered diagram and that’s all good. However, for a container shape that I want to use, I am unable to specify text that appears in the shape. 

Below is a simple JSON file that makes use of containers. I’ve specified 2 different ways to create the container, and for both, I can’t see text in the diagram. 

Can someone point out how to specify text for the container shapes with id=”containerTest” and “container1”? (I would prefer to use “container1” formatting). 

After making manual changes to the rendered diagram, I would like to export this diagram to CSV, having the shape text appear in the “Text Area 1” or “Text Area 2” columns. 
 

{
"product": "lucidchart",
"version": 1,
"pages": [
{
"id": "Page1",
"title": "TestingBlocks",
"settings": {
"size": {
"type": "letter",
"format": "landscape"
}
},
"shapes": [
{
"id": "containerTest",
"type": "rectangle",
"style": {
"fill": {
"type": "color",
"color": "#F0F0F0"
},
"stroke":{
"color": "#000000",
"width": 1,
"style": "solid"
}
},
"boundingBox": {
"x": 100,
"y": 700,
"w": 200,
"h": 200
},
"isContainer":true,
"shapes": [
{
"id": "text1",
"type": "Text",
"boundingBox": {
"x": 110,
"y": 710,
"w": 180,
"h": 20
},
"text": "CONTAINER C",
"style": {
"font": {
"family": "Arial",
"size": 8,
"bold": false
},
"alignment": "center"
}
}
],
"opacity": 50,
"zIndex": 0
},
{
"id": "container1",
"type": "roundedRectangleContainer",
"text": "containerAB",
"boundingBox": {
"x": 200,
"y": 50,
"h": 500
"w": 700,
},
"magnetize": true
},
{
"id": "block_1",
"type": "rectangle",
"customData": [
{
"key": "Num",
"value": "1"
}
],
"boundingBox": {
"x": 300,
"y": 100,
"w": 200,
"h": 200
},
"text": "A\n block {{=@Num}}"
},
{
"id": "block_3",
"type": "rectangle",
"customData": [
{
"key": "Num",
"value": "3"
}
],
"boundingBox": {
"x": 600,
"y": 100,
"w": 200,
"h": 200
},
"text": "B\n block {{=@Num}}"
}
],
"lines": []
}
]
}


 

Lucid product team
Oct 24, 2025 5:24 PM UTC

Hi ​@Pragat,

Happy to be of help here.

Unfortunately, the `isContainer` field you defined is not supported by our system. Via the Standard Import, shapes that are not naturally containers cannot be turned into one. I would recommend looking through our container library to see if one there can better fit the kind of container you want to create. I am fairly certain though that none of the containers defined there support text natively. A workaround might be to include a text block that is in the container that has the text defined that you wished to include.

Please let me know if you have any other questions that I can help resolve.

 

Comments

Lucid product team
Oct 24, 2025 5:24 PM UTC

Hi ​@Pragat,

Happy to be of help here.

Unfortunately, the `isContainer` field you defined is not supported by our system. Via the Standard Import, shapes that are not naturally containers cannot be turned into one. I would recommend looking through our container library to see if one there can better fit the kind of container you want to create. I am fairly certain though that none of the containers defined there support text natively. A workaround might be to include a text block that is in the container that has the text defined that you wished to include.

Please let me know if you have any other questions that I can help resolve.

 

Translate
PragatAuthor
Oct 24, 2025 6:32 PM UTC

Thank you for the feedback, Chasefreeman. Yes, I didn’t see any text properties for the containers on the container library page you shared. I will try a text block and see if I can make it work for what I need.

Translate