Skip to content

incomplete support of values #24

@vitusb

Description

@vitusb

Hello,

maybe the supported JSON-Types are not complete.

jnestedReplace_types

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 '':

jnestedReplace_noerror

Error, when using numbers, boolean and null - values:

jnestedReplace_error

Best regards,
vitusb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions