Closed dochoss closed 3 years ago
@dochoss Your error is likely related to your newlines. You need to escape both the double quotes and newlines using backslash notation. e.g.
{
"...": "",
"PolicySettings": {
"myXMLSetting": "<ClaimType Id=\"SomeId\">\n\t<DisplayName>SomeIdDisplay</DisplayName>\n\t<DataType>string</DataType>\n</ClaimType>"
}
}
The extension isn't doing anything special related to JSON. It's just calling JSON.parse on the appsettings file. I'll note that the above policy setting works for me when building.
Ah I see. I suspected it may have to do with white space. I'll try that. Should do the trick! I'll re-open if it doesn't. Thanks for your help @trittimo!
Hey team, my team is building some custom AD B2C policies and I'm looking to embed some XML metadata in my custom policy files. Production metadata is different than dev, so I'd like to be able to specify the metadata in the appsettings.json policy. However, adding the XML metadata in appsettings causes errors that leave the policy unable to be built. I've tried escaping double quotes in the metadata with single, double, and triple backslashes and removing line breaks, but none of this will resolve the errors. Any suggestions or assistance with how to accomplish this?