Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4619: Improve json prettifier #472

Conversation

VinceMacBuche
Copy link
Member

@@ -81,6 +81,53 @@ object RestUtils extends Loggable {
case _ => Failure("Prettify should only have one value, and should be set to true or false")
}

def render(value: JValue): Document = {
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure that that code is mostly copy/pasted from somewhere.
So please:

  • say from where, and which version (or branch, date) so that in the future, we will be able to know what changed in the original version (and so, we can follow security problem, for ex)
  • clearly say what are the modification and what are the intents of each of them (so that comparison with the original is possible, and comparison with future version will be, too)

@VinceMacBuche
Copy link
Member Author

Updated with origin of the code, and some explanation about what changed here


/**
* Our own JSON render function to extends net.liftweb.json.JsonAst.render function
* All code is taken from JsonAst object from lift-json_2.10-2.5.1.jar (dépendency used in rudder 2.10 at least)
Copy link
Member

Choose a reason for hiding this comment

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

Could you give an URL to the code? It's open source :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added!!

fanf added a commit that referenced this pull request Mar 17, 2014
…veJson_prettifier

Fixes #4619: Improve json prettifier
@fanf fanf merged commit 497f59f into Normation:master Mar 17, 2014
This pull request was closed.
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.

2 participants