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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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" } } } }

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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" } } } }

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.