-
- Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello,
maybe the supported JSON-Types are not complete.
I will get errors, when using "json-nested-replace" with JSON-Data that contains values of "numbers", "true", "false" and "null" without quotes or double-quotes under "QuickJS"-engine. I don't have "NodeJS" here for testing, but i think the error is portable here ...
I. e. for your example i will get a TypeError: not a function, when using :
const INPUT_JSON = {
'name': 'json-nested-replace',
'author': 'Arshad Kazmi',
'data01': 500,
<<<<<<<<<<<<< !!!
'data02': true,
<<<<<<<<<<<<< !!!
'data03': false,
<<<<<<<<<<<<< !!!
'repository': {
'url': 'https://github.com/arshadkazmi42/json-nested-replace',
'language': 'js'
}
};
Here are some screenshots from the "QuickJS"-Engine (the line above the error-message is the orig "JSON.parse(JSON.stringify());"-request without your code):
No error, when using "strings" with quoting "" or '':
Error, when using numbers, boolean and null - values:
Best regards,
vitusb