Added additional logic to generate properly-formed JSON string to send to the callback.

[Finishes #67345704]