https://github.com/foxcapades/gojasc
JSON Safe Binary Serialization
https://github.com/foxcapades/gojasc
deserialization golang library serialization
Last synced: 12 months ago
JSON representation
JSON Safe Binary Serialization
- Host: GitHub
- URL: https://github.com/foxcapades/gojasc
- Owner: Foxcapades
- License: mit
- Created: 2020-11-28T01:08:03.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-05T21:44:12.000Z (over 5 years ago)
- Last Synced: 2025-02-12T17:19:19.888Z (over 1 year ago)
- Topics: deserialization, golang, library, serialization
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.adoc
- License: LICENSE
Awesome Lists containing this project
README
= JSON Safe Binary Serialization
Elizabeth Paige Harper
v1.0, December 5, 2020
image:https://img.shields.io/github/v/tag/foxcapades/gojasc[GitHub tag (latest SemVer)]
image:https://img.shields.io/github/go-mod/go-version/foxcapades/gojasc[GitHub go.mod Go version]
image:https://img.shields.io/github/license/foxcapades/gojasc[GitHub]
image:https://img.shields.io/badge/api-docs-ff69b4[title="API Docs", link=https://pkg.go.dev/github.com/foxcapades/gojasc/v1/pkg/j57]
image:https://github.com/Foxcapades/gojasc/workflows/Go/badge.svg[Go]
image:https://codecov.io/gh/Foxcapades/gojasc/branch/main/graph/badge.svg?token=E4WD9IURJL[title=codecov, link=https://codecov.io/gh/Foxcapades/gojasc]
GoJasc provides a suite of utilities to serialize data into a binary form that
writes its octet output in a JSON safe range of ASCII characters.
.Basic Usage
[source, go]
----
package main
import (
"encoding/json"
"math"
"os"
"github.com/foxcapades/gojasc/v1/pkg/j57"
)
func main() {
data := j57.SerializeComplex128(complex(math.MaxFloat64, math.MaxFloat64))
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
enc.SetEscapeHTML(false)
_ = enc.Encode(string(data))
// Outputs:
// ".<=<[[=U=7(/.<=<[[=U=7(/"
}
----