Help us shape the future of Go! Take the 2026 Go Developer Survey

extract

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package extract contains functions for extracting JSON results into given structure or slice pointers. Those are wrappers over `json.Marshal` and `json.Unmarshal` functions with additional validation built it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Into

func Into(body io.Reader, to interface{}) error

Into parses input as JSON and convert to a structure.

func IntoSlicePtr

func IntoSlicePtr(body io.Reader, to interface{}, label string) error

IntoSlicePtr will unmarshal the provided body into the provided Slice.

func IntoStructPtr

func IntoStructPtr(body io.Reader, to interface{}, label string) error

IntoStructPtr will unmarshal the given body into the provided Struct.

func JsonMarshal

func JsonMarshal(t interface{}) ([]byte, error)

JsonMarshal marshals input to bytes via buffer with disabled HTML escaping.

Types

This section is empty.

Jump to

Keyboard shortcuts

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