You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[
{
"operation": "shift",
"spec": {
"rating": {
"primary": {
// simple match. Put the value '4' in the output under the "Rating" field"value": "Rating",
"max": "RatingRange"
},
// match any children of "rating"// Shiftr has a precendence order when matching, so the "*" will match "last".// In this case anything that isn't "primary"."*": {
// &1 means, go up one level and grab that value and substitute it in// in this example &1 = "quality""max": "SecondaryRatings.&1.Range",
"value": "SecondaryRatings.&1.Value",
//// We want "quality" to be a value field in the output under// "SecondaryRatings.quality.Id", but "quality" is an input key not an input value.// The "$" operator means use the input key, instead of the input value as ouput"$": "SecondaryRatings.&1.Id"
}
}
}
}
]
Comments are, of course, not a part of the standard JSON spec, but it would be great to be able to have some support for certain JSON5 extensions such as comments.
The text was updated successfully, but these errors were encountered:
glowinthedark
changed the title
feature: json5 style comments are not supported
feature: support for json5 style comments
May 16, 2024
@PaulJuliusMartinez: given that JSON5 is apparently a more expensive grammar and, for example, python's json5 3rd party module (https://pypi.org/project/json5/) is significantly less performant than 'native' plain JSON ("1000-6000x slower than the C-optimized JSON module" according to the project page), so it might also be slower with rust JSON5 implementations; maybe it would make sense to have the ability to switch parser engines, and enable JSON5 support with a flag at the expense of performance overhead?
jless throws an error with JSON5-style comments:
Comments are, of course, not a part of the standard JSON spec, but it would be great to be able to have some support for certain JSON5 extensions such as comments.
The text was updated successfully, but these errors were encountered: