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
In #181 we added a new command :JSONFormat which takes a JSON object and properly formats it.
e.g.
{"data":{"attributes":{"name":"sal"}}}
becomes
{
"data": {
"attributes": {
"name": "sal"
}
}
}
Unquoted Properties
Unfortunately, I find I'm often dealing with objects in JavaScript, which have less strict formatting rules. Specifically, the property names do not need to be quoted. e.g.
{
data: {
attributes: {
name: "sal"
}
}
}
Note: data, attributes, and name do not have quotes around them.
Additionally unfortunately, our current method fails in this situation.
It would be nice if the formatting logic handled this scenario as well.
The text was updated successfully, but these errors were encountered:
In #181 we added a new command
:JSONFormat
which takes a JSON object and properly formats it.e.g.
becomes
Unquoted Properties
Unfortunately, I find I'm often dealing with objects in JavaScript, which have less strict formatting rules. Specifically, the property names do not need to be quoted. e.g.
Note:
data
,attributes
, andname
do not have quotes around them.Additionally unfortunately, our current method fails in this situation.
It would be nice if the formatting logic handled this scenario as well.
The text was updated successfully, but these errors were encountered: