dotnet-opa-wasm icon indicating copy to clipboard operation
dotnet-opa-wasm copied to clipboard

Parsing failed if json data contains Cyrillic

Open nigma143 opened this issue 1 year ago • 2 comments

var module = OpaPolicyModule.Load("policy.wasm", _opaEngine); using var opaPolicy = module.CreatePolicyInstance();

opaPolicy.SetDataJson("{"User": "Россия"}"); <-- Parsing failed exception

nigma143 avatar Oct 23 '23 12:10 nigma143

https://github.com/christophwille/dotnet-opa-wasm/blob/a0a1da3211842370fa99a419b3c5b6ff27406613/src/Opa.Wasm/OpaPolicy.cs#L313

That calls into LoadJson

https://github.com/christophwille/dotnet-opa-wasm/blob/a0a1da3211842370fa99a419b3c5b6ff27406613/src/Opa.Wasm/OpaPolicy.cs#L326-L338

So looks the parsing error actually occurs inside OPA.

christophwille avatar Oct 23 '23 16:10 christophwille

#53

nigma143 avatar Nov 05 '23 19:11 nigma143