summaryrefslogtreecommitdiff
path: root/decode.go
AgeCommit message (Collapse)Author
2023-02-18decode_scan, jsonparse: Rework the behavior to make a bit more senseLuke Shumaker
- decode_scan: Don't have .Reset() re-play an erroring rune - decode_Scan: Have RuneTypeEOF always be zero-width - jsonparse: Don't replace syntax errors with RuneTypeEOF if there's no barrier
2023-02-16Clean up the hex handlingLuke Shumaker
2023-02-10tree-wide: Audit panic error messagesLuke Shumaker
These shouldn't happen, but if they do, then let's make it easier to debug.
2023-02-10decode: decodeAny: Use rune types rather that char literalsLuke Shumaker
2023-02-10decode: Remove now-superfluous recover blocksLuke Shumaker
2023-02-10decode: Have .readRune() and .expectRune() return *DecodeErrorLuke Shumaker
2023-02-10decode: Have .peekRuneType() return a *DecodeErrorLuke Shumaker
2023-02-10decode: Add a .maybeDecodeNull helperLuke Shumaker
This doesn't help much now, but it will help next commit when I add a *DecodeError return value from .peekRuneType().
2023-02-10decode: Have .expectRuneType() return a *DecodeErrorLuke Shumaker
2023-02-10decode: Have .decodeString() return a *DecodeErrorLuke Shumaker
2023-02-10decode: Have .scan() and .scanNumber() return *DecodeErrorLuke Shumaker
2023-02-10decode: Have .decodeNull() return a *DecodeErrorLuke Shumaker
2023-02-10decode: Have .decodeBool() return a *DecodeErrorLuke Shumaker
2023-02-10decode: Replace .panicType() with .newTypeError()Luke Shumaker
2023-02-10decode: Separate the scanner's panic-flow from the decoder's panic-flowLuke Shumaker
It may be useful to hit "ignore space change" when viewing this patch.
2023-02-10decode: Have .decodeAny return a *DecodeErrorLuke Shumaker
2023-02-10decode: Have .decodeArray take and return *DecodeErrorLuke Shumaker
2023-02-10decode: Have .decodeObject take and return *DecodeErrorLuke Shumaker
2023-02-10decode: Move the recover() from Decode() to decode()Luke Shumaker
2023-02-10decode: Rewrite .scan() to avoid making a new scannerLuke Shumaker
2023-02-10Be more careful about importing encoding/jsonLuke Shumaker
2023-02-10tree-wide: Update various references from Go 1.18 to Go 1.20Luke Shumaker
2023-02-07Move struct-handling to internal/jsonstructLuke Shumaker
2023-02-07internal: Split in to sub-packagesLuke Shumaker
2023-02-07decode: Fix decoding an actively growing fileLuke Shumaker
2023-01-30Invent "barriers" instead of nesting parsersLuke Shumaker
2023-01-30decode: Inline noWsRuneTypeScanner into runeTypeScannerImplLuke Shumaker
2023-01-30Avoid doing type switching in inner functionsLuke Shumaker
The CPU profiler tells me that the encoder is spending a lot of time on type switches.
2023-01-30decode: Tidy up DecodeObject and DecodeArrayLuke Shumaker
2023-01-30decode: Fix DecodeTypeError offsetsLuke Shumaker
2023-01-30decode: s/stack/structStack/Luke Shumaker
This should make the next commit less noisy.
2023-01-29Move the base64 decode to the internal packageLuke Shumaker
2023-01-29.golangci.yml: Turn on 'nakedret', fixLuke Shumaker
2023-01-29.golangci.yml: Turn on formatting linters 'gci' and 'gofumpt', fixLuke Shumaker
All formatting changes are made by ./tools/bin/golangci-lint run --fix ./...
2023-01-29Improve/fix documentation and commentsLuke Shumaker
2023-01-26Write documentationv0.2.0Luke Shumaker
2023-01-26Move the Parser to the internal packageLuke Shumaker
2023-01-25Delete things I don't want to documentLuke Shumaker
2022-08-21Add tests for the actual usability of the Decodable and Encodable interfacesLuke Shumaker
2022-08-21decode: Add DecodeObject and DecodeArray helper methodsLuke Shumaker
2022-08-21decode: Lean in to io.RuneScannerLuke Shumaker
So that it's easier to compose your own .DecodeJSON methods, since .DecodeJSON takes an io.RuneScanner.
2022-08-17Get the linter passing (even if it means ignoring borrowed files)Luke Shumaker
2022-08-17DecodeThenEOF: SimplifyLuke Shumaker
2022-08-17decode: Don't be greedy unless we're looking for EOFLuke Shumaker
2022-08-17Fix those now-failing error checksLuke Shumaker
2022-08-17Add tests for decode reading too farLuke Shumaker
2022-08-16Run the fuzzer a bitLuke Shumaker
2022-08-16Get borrowed_decode_test.go passingLuke Shumaker
2022-08-16Push nesting-depth checks down in to the parser [ci-skip]Luke Shumaker
2022-08-16wip: Reduce test differences [ci-skip]Luke Shumaker
- Handle UTF-16 surrogate pairs - Handle cycles in values - Handle cycles in types - Better errors - Handle case-folding of struct field names - Allow []byteTypeWithMethods - Fix struct field-order - Fix handling of interfaces storing pointers - Enforce a maximum decode depth - Validate struct tags