Skip to content

Releases: 7PH/json-cursor-path

v1.1.0

23 Jan 00:03
@7PH 7PH

Choose a tag to compare

🔥 Release preview

Improved robustness for edge cases: proper handling of escaped characters in strings and malformed JSON with trailing
commas.

// Escaped characters now correctly calculated in string indices                                                           
getJsonCursorPath('{"key": "hello\\"world"}', 18);                                                                         
// Returns correct path accounting for escape sequences                                                                    

🚀 Features

  • Implement escape-aware string index calculation (#4)

🤔 Changes

n/a

💻 Code quality

  • Implement 100% branch coverage (#4)
  • Refactor code to use re-usable constants (#4)

🐞 Bug fixes

  • Fix stack overflow on malformed JSON arrays with trailing commas (#4)
  • Add boundary check in parseObjectKey (#4)

👥 Thanks

  • @7PH for all contributions in this release

v1.0.1

08 Jul 22:57
@7PH 7PH

Choose a tag to compare

🐞 Bug fixes

  • Fix cursor paths when placed in empty strings
  • Fix arrays as root object in JSON

Full Changelog: v1.0.0...v1.0.1

v1.0.0

08 Jul 00:44
@7PH 7PH

Choose a tag to compare

Initial release

Convert a cursor position in a JSON file to the path in the parsed JSON object.