If one has a reproducible JSON serializer, then one can add a signature to any JSON object via serializing the object, signing that and then adding the resulting signature to the original object.
This avoids JSON-inside-JSOn and allows to pretty-print the original object with the signature.