examples/

directory
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT

README

Examples

Runnable programs that show the main orderedobject usage paths.

Run them from the repository root:

go run ./examples/basic
go run ./examples/json
go run ./examples/map
go run ./examples/type
go run ./examples/nested
go run ./examples/array
go run ./examples/error
Example Demonstrates
basic Creating, updating, deleting, iterating, and cloning ordered objects.
json Encoding and decoding JSON while preserving top-level member order.
map Bridging to and from map[string]V when order is not required.
type Using concrete generic value types.
nested Nesting ordered objects for structured JSON output.
array Encoding slices of ordered objects.
error Handling missing keys, type assertions, and JSON decode errors.

Directories

Path Synopsis
Package main demonstrates slices of ordered objects.
Package main demonstrates slices of ordered objects.
Package main demonstrates basic orderedobject operations.
Package main demonstrates basic orderedobject operations.
Package main demonstrates orderedobject error handling.
Package main demonstrates orderedobject error handling.
Package main demonstrates JSON encoding and decoding with orderedobject.
Package main demonstrates JSON encoding and decoding with orderedobject.
Package main demonstrates map conversion with orderedobject.
Package main demonstrates map conversion with orderedobject.
Package main demonstrates nested ordered objects.
Package main demonstrates nested ordered objects.
Package main demonstrates concrete value types with orderedobject.
Package main demonstrates concrete value types with orderedobject.

Jump to

Keyboard shortcuts

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