Json from rest question

Quick question: serializeJSON dosent return json that my other applications can consume easily. Running 5.4

.cfc file :
<cfreturn serializeJSON(userQueryData, "true")>


How do I get it to return:

Without the extra " " and \ (backslashes) in the string.

I am using jsonpath. And I cannot get the path of token:

None of the json path examples have \ in their json.
for example: JSON with JSONPath

SerializeJSON for queries works well, I use it very often.
Those extra backslashes make me think that you are serializing data that has already been serialized.

Can we see the contents of userQueryData? Does it contains a JSON values?

1 Like

You totally correct. total brain fart on my part. Thank you!

<cfset userQueryData = {}>
<cfset userQueryData["token"] = newuuid>
<cfreturn serializeJSON(userQueryData, "true")>

I should just return <cfreturn userQueryData)>