Tinple / easyjson

An easy way to express/add/modify/delete item with json file.
MIT License
6 stars 0 forks source link

complex charaters in json name #3

Open bdelville opened 7 years ago

bdelville commented 7 years ago

If the json name contains characters such as "@" or "-", the nested feature does not work

easyjson.path(pathPackage)
    .modify('dependencies[@group/library-core]', coreVersion)
    .express();
bdelville commented 7 years ago

With this code:

easyjson.path(pathPackage)
    .add('dependencies[@group/library-core]', coreVersion)
    .express();

It ends up adding this in the json:

{
    dependencies: {
        "@group/library-core" : "2.0.10"
    },
    "dependencies[@group/library-core]": "2.0.78"
}