Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
agwalsh1812
Helper I
Helper I

Have created a JSON file from a text file but PowerBI rejecting it

I have generated this code based on a (dead) artist's work - Harry Clarke. I copied it into a text file and saved this file as a JSON one to use as a theme in PowerBI. However I got a message from PowerBI saying "Error importing theme file...The JSON syntaz was invalid, missing required proper "name", used invalid colors, or provided invalid top-level properties. ". What am I missing?

{
"name": "Harry Clarke",
"dataColors": [
"#3E4B52", // Deep Blue
"#844C44", // Maroon
"#968A46", // Olive Green
"#CB793A", // Burnt Orange
"#4D7D7A", // Teal
"#6D738C", // Smoky Purple
"#AA5C1C", // Rust Brown
"#BA9C48", // Golden Yellow
"#4C6D70", // Slate Blue
"#736C8E" // Lavender
],
"background": "#F4F2F0",
"foreground": "#3E4B52",
"tableAccent": "#968A46",
"visualStyles": {
"*": {
"*": {
"fontFamily": "'Segoe UI', 'Arial', sans-serif",
"fontSize": "11px"
}
},
"Title": {
"color": "#844C44",
"fontWeight": "bold",
"fontSize": "18px"
},
"Visual title": {
"color": "#3E4B52",
"fontWeight": "bold",
"fontSize": "14px"
},
"Grid": {
"gridVerticalStrokeWidth": 0.5,
"gridHorizontalStrokeWidth": 0.5,
"gridStroke": "#BA9C48"
},
"TextValue": {
"color": "#3E4B52",
"fontSize": "14px"
},
"Axis": {
"grid": {
"show": true,
"stroke": "#BA9C48",
"strokeWidth": 0.5
},
"title": {
"color": "#844C44",
"fontSize": "12px",
"fontWeight": "bold"
},
"labels": {
"color": "#3E4B52",
"fontSize": "11px"
}
},
"Legend": {
"title": {
"color": "#3E4B52",
"fontWeight": "bold",
"fontSize": "12px"
},
"label": {
"color": "#3E4B52",
"fontSize": "11px"
}
}
}
}

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try without spaces

{ "name": "Harry Clarke", "dataColors": [ "#3E4B52", "#844C44", "#968A46", "#CB793A", "#4D7D7A", "#6D738C", "#AA5C1C", "#BA9C48", "#4C6D70", "#736C8E" ], "background": "#F4F2F0", "foreground": "#3E4B52", "tableAccent": "#968A46", "visualStyles": { "*": { "*": { "fontFamily": "'Segoe UI', 'Arial', sans-serif", "fontSize": "11px" } }, "Title": { "color": "#844C44", "fontWeight": "bold", "fontSize": "18px" }, "Visual title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "14px" }, "Grid": { "gridVerticalStrokeWidth": 0.5, "gridHorizontalStrokeWidth": 0.5, "gridStroke": "#BA9C48" }, "TextValue": { "color": "#3E4B52", "fontSize": "14px" }, "Axis": { "grid": { "show": true, "stroke": "#BA9C48", "strokeWidth": 0.5 }, "title": { "color": "#844C44", "fontSize": "12px", "fontWeight": "bold" }, "labels": { "color": "#3E4B52", "fontSize": "11px" } }, "Legend": { "title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "12px" }, "label": { "color": "#3E4B52", "fontSize": "11px" } } } }

View solution in original post

2 REPLIES 2
agwalsh1812
Helper I
Helper I

That worked beautifully - thank you. Why did the spaces make such a difference? Just so I know for future reference. 

amitchandak
Super User
Super User

Try without spaces

{ "name": "Harry Clarke", "dataColors": [ "#3E4B52", "#844C44", "#968A46", "#CB793A", "#4D7D7A", "#6D738C", "#AA5C1C", "#BA9C48", "#4C6D70", "#736C8E" ], "background": "#F4F2F0", "foreground": "#3E4B52", "tableAccent": "#968A46", "visualStyles": { "*": { "*": { "fontFamily": "'Segoe UI', 'Arial', sans-serif", "fontSize": "11px" } }, "Title": { "color": "#844C44", "fontWeight": "bold", "fontSize": "18px" }, "Visual title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "14px" }, "Grid": { "gridVerticalStrokeWidth": 0.5, "gridHorizontalStrokeWidth": 0.5, "gridStroke": "#BA9C48" }, "TextValue": { "color": "#3E4B52", "fontSize": "14px" }, "Axis": { "grid": { "show": true, "stroke": "#BA9C48", "strokeWidth": 0.5 }, "title": { "color": "#844C44", "fontSize": "12px", "fontWeight": "bold" }, "labels": { "color": "#3E4B52", "fontSize": "11px" } }, "Legend": { "title": { "color": "#3E4B52", "fontWeight": "bold", "fontSize": "12px" }, "label": { "color": "#3E4B52", "fontSize": "11px" } } } }

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.