json

command
v0.0.0-...-cf25b83 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 2 Imported by: 0

README

json example

Encode a struct to json and decode back to a struct.

GitHub Webpage

ENCODE

Encodes json to a string from a struct.

  • struct -> encode -> byte -> string

json.Marshal encodes a struct to json data.

DECODE

Decodes json to a struct from a string.

  • string -> byte -> decode -> struct

json.Unmarshal decodes json data to a struct.

RUN

go run json.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL