mohsen1 / json-formatter

Angular directive for collapsible JSON in HTML
http://azimi.me/json-formatter/demo/demo.html
Other
372 stars 85 forks source link

Add functionality for parsing nested JSON strings #65

Closed jseed closed 7 years ago

jseed commented 7 years ago

This commit adds the option parseJSONValues to the JSONFormatterConfig. When this option is true, the formatter will try to parse string values into objects.
Due to the potential performance impact, it is disabled by default.

Our use case for this feature was expanding database fields containing JSON objects as strings.

mohsen1 commented 7 years ago

Thanks for your PR. Parsing JSON is out of scope of this directive. You can always parse the JSON before sending it to this directive.

I understand that this is a common use case but I rather keep scope of this directive small.