json

command
v0.0.0-...-a2a1f02 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 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