...

Package json

import "github.com/gabriel-vasile/mimetype/internal/json"
Overview
Index

Overview ▾

Package json provides a JSON value parser state machine. This package is almost entirely copied from the Go stdlib. Changes made to it permit users of the package to tell if some slice of bytes is a valid beginning of a json string.

func Scan

func Scan(data []byte) (int, error)

Scan returns the number of bytes scanned and if there was any error in trying to reach the end of data.