You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-37
Original file line number
Diff line number
Diff line change
@@ -4,55 +4,23 @@
4
4
5
5
# Description
6
6
7
-
**go-simple-serializer** (aka GSS) is a simple library for serializing/deserializing objects that aims to decrease the burden on developers to support multiple serialization formats in their applications. GSS supports a variety of operating systems, architectures, and use cases. A CLI is released for Microsoft Windows, Linux distributions, and [Darwin](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29) platforms.
7
+
**go-simple-serializer** (aka GSS) is a simple library to easily convert data between formats that aims to decrease the burden on developers to support multiple serialization formats in their applications. GSS supports a variety of operating systems, architectures, and use cases. A CLI is released for Microsoft Windows, Linux distributions, and [Darwin](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29) platforms.
8
8
9
9
Using cross compilers, this library can also be called by other languages, including `C`, `C++`, `Python`, and `JavaScript`. This library is cross compiled into a Shared Object file (`*.so`), which can be called by `C`, `C++`, and `Python` on Linux machines. This library is also compiled to pure `JavaScript` using [GopherJS](https://github.com/gopherjs/gopherjs), which can be called by [Node.js](https://nodejs.org) and loaded in the browser. See the examples folder for patterns that you can use.
`hcl` and `hcl2` implementation is fragile and very much in `alpha`. The other formats are well-supported.
13
+
GSS supports many common formats, including CSV, JSON, and YAML. Pull requests to support other formats are welcome! See the [Formats.md](docs/Formats.md) document for a full list of supported formats.
30
14
31
15
**Packages**
32
16
33
-
The main public api for GSS is in the `gss` package. However, this library does ship with lower-level packages that can be imported directly as well.
34
-
35
-
| Package | Purpose |
36
-
| ---- | ------ |
37
-
| bson | Binary JSON |
38
-
| escaper | Escape/unescape strings |
39
-
| gss | The main public API |
40
-
| inspector | Reusable functions for inspecting objects |
41
-
| iterator | Wrapper for iterable formats |
42
-
| json | JSON |
43
-
| jsonl | JSON Lines |
44
-
| properties | Properties Files |
45
-
| scanner | Scanning through a stream of bytes |
46
-
| splitter | Creating custom bufio.SplitFunc |
47
-
| sv | Separated-Values formats, i.e., CSV and TSV. |
48
-
| toml | TOML |
49
-
| yaml | YAML |
17
+
The main public api for GSS is in the `gss` package. However, this library does ship with internal packages under `/pkg/...` that can be imported and used directly.
50
18
51
19
# Usage
52
20
53
21
**CLI**
54
22
55
-
The command line tool, `gss`, can be used to easily covert data between formats. We currently support the following platforms.
23
+
The command line tool, `gss`, can be used to easily convert data between formats. We currently support the following platforms.
56
24
57
25
| GOOS | GOARCH |
58
26
| ---- | ------ |
@@ -61,7 +29,7 @@ The command line tool, `gss`, can be used to easily covert data between formats.
61
29
| windows | amd64 |
62
30
| linux | arm64 |
63
31
64
-
Pull requests to support other platforms are welcome! See the [examples](#examples) section below for usage.
32
+
Pull requests to support other platforms are welcome! See the [CLI.md](docs/CLI.md) document for detailed usage and examples.
65
33
66
34
**Go**
67
35
@@ -196,6 +164,14 @@ The default destination for build artifacts is `go-simple-serializer/bin`, but y
196
164
197
165
# Testing
198
166
167
+
**CLI**
168
+
169
+
To run CLI testes use `make test_cli`, which uses [shUnit2](https://github.com/kward/shunit2). If you recive a `shunit2:FATAL Please declare TMPDIR with path on partition with exec permission.` error, you can modify the `TMPDIR` environment variable in line or with `export TMPDIR=<YOUR TEMP DIRECTORY HERE>`. For example:
170
+
171
+
```
172
+
TMPDIR="/usr/local/tmp" make test_cli
173
+
```
174
+
199
175
**Go**
200
176
201
177
To run Go tests use `make test_go` (or `bash scripts/test.sh`), which runs unit tests, `go vet`, `go vet with shadow`, [errcheck](https://github.com/kisielk/errcheck), [ineffassign](https://github.com/gordonklaus/ineffassign), [staticcheck](https://staticcheck.io/), and [misspell](https://github.com/client9/misspell).
0 commit comments