Making an azure Function to merge two JSON objects
I'm trying to make an Azure Function to merge two JSON objects, but apparently azure Functions don't like the idea of adding a JSON like this:
so now I'm trying to figure out how to make sure I can pass two json objects of which I not know their data into the request body.
My parameters on the request body should be
(JSON)main_object
, (JSON)secondary_object
, (anything, so JToken??)matching_property
, (string[])merge_properties
Does this mean I should be using JToken
?
currently I'm trying this:
I would love some assistance 😅 I'm stuck at this for 2 days now9 Replies
Currently it's breaking on the initial
JsonConvert.DeserializeObject<Inputs>(requestBody)
what's the input you're sending?
well I have this atm:
and what I get on the Azure Function portal when I try to test with the following bit of Json
I get this error shown in the logs:
(Edited the JSON input I use)
that's a weird error message
yea, kind of is innit 😅 hence my question
what library is JsonConvert?
you might want to try it with
System.Text.Json
I've got it solved!
I had an additional
,
at the end of my JSON that was the entire issue... <:picard_facepalm:616692703685509130>