summaryrefslogtreecommitdiff
path: root/json/public_test.go
AgeCommit message (Collapse)Author
2023-02-28[COMPLIANCE] Add Copyright and License Headers (#586)hashicorp-copywrite[bot]
* [COMPLIANCE] Add Copyright and License Headers * add copywrite file and revert headers in testdata --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Liam Cervante <liam.cervante@hashicorp.com>
2020-09-04json: Add ParseExpression functionwata_mac
2020-08-24json: Add json.ParseWithStartPos functionKazuma Watanabe
This is like json.Parse but allows specifying a non-default start position, in case the caller is parsing a fragment from a larger JSON document.
2020-03-25json: Fix panic when parsing malformed JSONAlisdair McDiarmid
When scanning JSON, upon encountering an invalid token, we immediately return. Previously this return happened without inserting an EOF token. Since other functions assume that a token sequence always ends in EOF, this could cause a panic. This commit adds a synthetic EOF token after the invalid token before returning. While this does not match the real end-of-file of the source JSON, it is marking the end of the scanned bytes, so it seems reasonable. Fixes #339
2019-09-09Unfold the "hcl" directory up into the rootMartin Atkins
The main HCL package is more visible this way, and so it's easier than having to pick it out from dozens of other package directories.