Skip to content

Tags: tinylib/msgp

Tags

v1.2.5

Toggle v1.2.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Ignore complexity of children in maps/slices (#382)

When considering inlining maps/slices/arrays, apply a fixed cost and ignore the cost of the children.

If children are too expensive, they will not be inlined, but it shouldn't affect whether the map itself is inlined.

This only really applies when a map or slice type is aliased, otherwise it will not be considered for inlining.

Fixes #381

v1.2.4

Toggle v1.2.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add "newtime" directive to use official messagepack time format (#378)

This adds `msgp:newtime` file directive that will encode all time fields using the -1 extension as defined in the [(revised) messagepack spec](https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type)

ReadTime/ReadTimeBytes will now support both types natively, and will accept either as input.

Extensions should remain unaffected.

Fixes #300

v1.2.3

Toggle v1.2.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix allownil on maps elements (#375)

* Fix allownil on maps elements
* Also set for primitives.

Similar to #374 map `[]byte` elements would also inherit allownil unintentionally.

v1.2.2

Toggle v1.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add native json.Number support (#364)

Allow encoding and decoding of `json.Number` values, either as struct members or as interface members.

Numbers will be encoded as integer, if possible, otherwise float64/float32 is used. The zero value json.Number will be encoded as 0.

It is possible to encode as string with `//msgp:replace json.Number with:string`.

Fixes #292

v1.2.1

Toggle v1.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add recursion limit for dynamic code (#358)

Prevent stack exhaustion on:

Decoder:

* CopyNext
* Skip
* ReadIntf
* ReadMapStrIntf
* WriteToJSON

Standalone:

* Skip
* ReadMapStrIntfBytes
* ReadIntfBytes
* CopyToJSON
* UnmarshalAsJSON

Limit is set to 100K recursive map/slice operations.

v1.2.0

Toggle v1.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
`replace` directive (#346)

Adds a `replace` directive that makes it easier to serialize foreign types.

Example usage with github.com/google/uuid

  ```go
  package main

  import "github.com/google/uuid"

  //go:generate msgp

  //msgp:replace uuid.UUID with:UUID
  type UUID [16]byte

  // Or like that
  //msgp:replace uuid.UUID with:[16]byte

  type User struct {
    ID uuid.UUID
  }
  ```

v1.1.9

Toggle v1.1.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
chore: Upgrade dependencies + CI (#335)

* Minimum version is Go 1.18
* Upgrade tinygo for test
* Fix tinygo tests on windows
* Fix windows lint

v1.1.8

Toggle v1.1.8's commit message
README: update link to docs website, and add docs reference badge

godoc.org moved to pkg.go.dev, so updating the link; while updating the
file also added a badge to link to the module's reference on pkg.go.dev.

Signed-off-by: Sebastiaan van Stijn <[email protected]>

v1.1.7

Toggle v1.1.7's commit message
update go.mod

v1.1.6

Toggle v1.1.6's commit message
msgp: fix dropped test errors