Syntactically incorrect JSON in some examples

Issue #1220 closed
Kai Lehmann created an issue

While working on PR#48 and working on example on how to embedd attachment data in the JSON response, I noticed that JSON does in fact not support multiline strings (line breaks inside of strings apart from using “\n”). There are a few JSON examples (e.g. multiple_external_claims_sources.json, siop_aggregated_and_distributed_claims.json, aggregated_claims_simple.json, …) which use line breaks in the JWT string. This is syntactically incorrect JSON. Although it makes it more readable to the human eye, an IDE or JSON interpreter will mark this as syntax error.

Comments (7)

  1. Kai Lehmann reporter

    Sure, I can convert those JWT values to single lines. It might be necessary to modify the documentation generation as there should be some wrapping employed to make those examples readable in the output. I’ll see what I can do.

  2. Kai Lehmann reporter

    As expected the xml/html output does not wrap the examples. However, the layout of the html output is still pretty enough. The long lines in JSON examples are simply cut and one can select the string or scroll inside of the example frame if need be. The docker image used to render the html output does not render txt at this moment, so I can’t see how this would look like in plain text. Is it required to render the specification as text as well?

  3. Daniel Fett

    I don’t think that we need the text version. I support just removing the line breaks for now; we can add an additional preprocessing step to wrap the lines later on if required.

  4. Kai Lehmann reporter

    Ok, I updated the JSON together with this pull request. Somehow Bitbucket decided to already close this issue here although the associated PR is not yet merged.

  5. Torsten Lodderstedt

    Does not look as pretty as before (in my opinion) but does not hurt and is syntactically correct now 🙂. I approved the PR.

  6. Log in to comment