fakesimdjson

package module
v0.0.0-...-2ec951e Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 8 Imported by: 0

README

fakesimdjson builds a simdjson-go tape using the stdlib's JSON parser.

It is slow and does a lot of allocations. This is a workaround to run programs using simdjson-go on developer's machine with other architecture than amd64 (like the M1 MacBook) until simdjson-go has a arm64 or a generic version, see https://github.com/minio/simdjson-go/issues/51 for details.

Usage:

if simdjson.SupportedCPU() {
	parsed, err = simdjson.Parse(data, reused)
} else {
	parsed, err = fakesimdjson.Parse(data)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(b []byte) (*simdjson.ParsedJson, error)

Parse a block of data and return the parsed JSON.

func ParseND

func ParseND(b []byte) (*simdjson.ParsedJson, error)

ParseND will parse and return a block of newline-delimited JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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