-
Type: Sub-task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 3.7.0
-
Fix Version/s: 3.7.0
-
Component/s: Registries
-
Tags:
-
Sprint:NOS end Feb 11.1.3, NOS 11.1.6 - 2019-04 1, NOS 11.1.8 - 2019-05 01, NOS 11.1.9 - 2019-05 02, NOS 11.1.10 - 2019-06 01, NOS 11.1.11 - 2019-06 02
-
Story Points:0
Context
Currently, the registries JSON files are incorrectly formatted. Its content uses JSON5 format, which is a JavaScript way for JSON. It causes highlight problems, e.g. on GitHub and in IntelliJ IDEA. Here's the comparison before and after the formatting:
Before:
{ a: 1 }
After:
{ "a": 1 }
Other invalid syntax to fix are:
Error | Example |
---|---|
Comment | // Comments... |
Dash-like key | my-key: |
At-sign key | @key: |
... | ... |
Motivation
Jackson JSON Object Mapper failed to understand JSON5 format. It can only read valid JSON. That's why we didn't choose it for deserialization. We were forced to use another library called json-lib (net.sf.json-lib:json-lib:2.4:jdk15), released in 2010 and no longer maintained. Formatting JSON correctly will allow us to reconsider the Jackson solution and open new opportunities for improving the registry layer in NOS.