Skip to content

Conversation

@hannesaddec
Copy link

This PR solves issue #236

try {
// Parsing description as a JSON
descObj = JSON.parse(descStr);
for (const x in descObj) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens when the payload is json, but not structured as a dict?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the provided description is not structured as a JSON dictionary, it is not a JSON. Consequently, it would treat it as a plain text and it would not be processed thus entering the catch block.

}
} catch(e) {
//Not a JSON description
metaDivp.text("{{.Description }}");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't {{.Description}} already emitted in the paragraph block above?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The paragraph needs to reset its text before the try block. On the contrary, it would append the processed JSON description just after the unprocessed description. The catch is for the text that it is not structured as JSON.

@pramsey
Copy link
Collaborator

pramsey commented Sep 16, 2025

There's no documentation of this new feature, so as it stands it will have just one user.

@BMSDI
Copy link

BMSDI commented Sep 18, 2025

There's no documentation of this new feature, so as it stands it will have just one user.

We will update the readme.md explaining the additions.

@BMSDI
Copy link

BMSDI commented Oct 9, 2025

@pramsey We have updated the readme explaining the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants