Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseWithPointers(): An StackOverflow error occurs when the deeply nested JSON character string is parsed. #131

Open
PoppingSnack opened this issue Jun 27, 2024 · 0 comments

Comments

@PoppingSnack
Copy link

parseWithPointers() does not support deeply nested JSON strings.

import { parseWithPointers} from '@stoplight/json'
let json = `{ "a": { "a": ... 1 ... } }`; //  Nesting depth: 9000
parseWithPointers(json);

error log:

    at m (oh_modules/.ohpm/@[email protected]/oh_modules/@stoplight/json/index.es.js:1:8199)
    at onObjectBegin (oh_modules/.ohpm/@[email protected]/oh_modules/@stoplight/json/index.es.js:1:8369)
    at anonymous (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:359:53)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:492:9)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    at parseObject (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:509:18)
    at parseValue (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:560:24)
    at parseProperty (oh_modules/.ohpm/[email protected]/oh_modules/jsonc-parser/lib/esm/impl/parser.js:482:18)
    ......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant