Forum Discussion
Bessonnizza
6 years agoHelper II
Json.FromValue
Hello there, I want to write POST request with data for WEB service. I try to use Json.FromValue function to convert to JSON, but it isn't working. JSON data schema: My POST request...
lbendlin
6 years agoSuper User
Either try Text.ToBinary or encode the text with Base64 before feeding it to the Binary.FromText function.
ImkeF
6 years agoCommunity Champion
Hi lbendlin ,
is there any specific reason why you're not working with the Json.FromValue function?
To my understanding it is just the fitting function here and doesn't require all this escaping that can quickly lead to errors.
The Json.FromValue function also allows for different encodings in the optional 2nd parameter.
- ImkeF6 years agoCommunity Champion
Hi lbendlin ,
you might bi interested in this little article that I wrote some time ago: https://www.thebiccountant.com/2018/06/05/easy-post-requests-with-power-bi-and-power-query-using-json-fromvalue/