Documentation
¶
Overview ¶
- Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
- SPDX-License-Identifier: Apache-2.0
Package json preserves the existing JSON import path.
Deprecated: Use github.com/ARM-software/golang-utils/utils/serialisation/json.
Index ¶
- Variables
- func IsJSON(extension string) bool
- func Marshal(v any) ([]byte, error)
- func MarshalWithContext(ctx context.Context, v any) ([]byte, error)
- func ToYAML(rawJSON []byte) ([]byte, error)
- func Unmarshal(data []byte, v any) error
- func UnmarshallWithContext(ctx context.Context, data []byte, v any) error
- type Decoder
- type Encoder
Constants ¶
This section is empty.
Variables ¶
var IsValidJSON = serialisation.IsValidJSON
IsValidJSON validates JSON strings and byte slices.
var JSONExtensions = serialisation.JSONExtensions
JSONExtensions lists the file extensions considered JSON files.
Functions ¶
func MarshalWithContext ¶
MarshalWithContext encodes a value to JSON with a context-aware encoder.
Types ¶
type Decoder ¶
type Decoder = serialisation.Decoder
Decoder decodes successive JSON values from a reader.
Directories
¶
| Path | Synopsis |
|---|---|
|
jsontest
|
|
|
easyjson
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors.
|
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. |
|
ffjson
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors.
|
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. |
|
nofast
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors.
|
* Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. |