Skip to content
Sections
>> Trisquel >> Pakiety >> nabia >> devel >> golang-github-bep-tmc-dev
nabia  ] [  aramo  ]
[ Pakiet źródłowy: golang-github-bep-tmc  ]

Pakiet: golang-github-bep-tmc-dev (0.5.1-2)

provides round-trip serialization of typed Go maps

Codec for a Typed Map

bep/tmc provides basic roundtrip JSON etc. encoding/decoding of a map[string]interface{} with custom type adapters.

Text based serialization formats like JSON and YAML are convenient, but when used with Go maps, most type information gets lost in translation. For structs, one can work around some of the limitations with custom MarshalJSON, UnmarshalJSON, MarshalText and UnmarshalText. For the commonly used flexible and schema-less "map[string]interface {}", this is, as the author is aware of, not an option. This library provides a solution to this problem.

See the GoDoc at https://godoc.org/github.com/bep/tmc for some basic examples and how to configure custom codec, adapters, etc.

Inne pakiety związane z golang-github-bep-tmc-dev

  • wymaga
  • poleca
  • sugeruje

Pobieranie golang-github-bep-tmc-dev

Pobierz dla wszystkich dostępnych architektur
Architektura Rozmiar pakietu Rozmiar po instalacji Pliki
all 7,8 KiB36 KiB [lista plików]