Allow parsing objects using JavaScript spread syntaxt:
let entry = { name: "Test", value: "drive"};
let expanded_entry = { ...entry, "new": "data"};
let names = ["John", "Joe", "Jack"];
let expanded_names = [...names, "James"];
Currently it's not possible:
>>> chompjs.parse_js_object('{ ...entry, "new": "data"}')
Traceback (most recent call last):
...
json.decoder.JSONDecodeError: Expecting ':' delimiter: line 1 column 12 (char 11)
>>> chompjs.parse_js_object('[...names, "James"]')
Traceback (most recent call last):
...
ValueError: Error parsing input near character 4
I guess expected output should be {"new": "data"} and ["James"] and entries marked with triple dots should be ignored.
Allow parsing objects using JavaScript spread syntaxt:
Currently it's not possible:
I guess expected output should be
{"new": "data"}and["James"]and entries marked with triple dots should be ignored.