{"id":42640835,"url":"https://github.com/spatialcurrent/go-simple-serializer","last_synced_at":"2026-01-29T06:14:43.064Z","repository":{"id":28781591,"uuid":"119308419","full_name":"spatialcurrent/go-simple-serializer","owner":"spatialcurrent","description":"Simple library and command line program for converting between JSON, YAML, TOML, and many more common serialization formats.","archived":false,"fork":false,"pushed_at":"2022-03-09T20:25:41.000Z","size":487,"stargazers_count":12,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T10:43:02.320Z","etag":null,"topics":["big-data","bigdata","data"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/spatialcurrent/go-simple-serializer/gss","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spatialcurrent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-28T23:40:43.000Z","updated_at":"2024-08-03T07:01:52.000Z","dependencies_parsed_at":"2022-08-07T14:00:44.306Z","dependency_job_id":null,"html_url":"https://github.com/spatialcurrent/go-simple-serializer","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/spatialcurrent/go-simple-serializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgo-simple-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgo-simple-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgo-simple-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgo-simple-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spatialcurrent","download_url":"https://codeload.github.com/spatialcurrent/go-simple-serializer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spatialcurrent%2Fgo-simple-serializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28865712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T05:56:06.453Z","status":"ssl_error","status_checked_at":"2026-01-29T05:55:57.668Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-data","bigdata","data"],"created_at":"2026-01-29T06:14:42.278Z","updated_at":"2026-01-29T06:14:43.051Z","avatar_url":"https://github.com/spatialcurrent.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/spatialcurrent/go-simple-serializer/tree/master.svg?style=svg)](https://circleci.com/gh/spatialcurrent/go-simple-serializer/tree/master) [![Go Report Card](https://goreportcard.com/badge/spatialcurrent/go-simple-serializer)](https://goreportcard.com/report/spatialcurrent/go-simple-serializer)  [![GoDoc](https://godoc.org/github.com/spatialcurrent/go-simple-serializer?status.svg)](https://godoc.org/github.com/spatialcurrent/go-simple-serializer) [![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://github.com/spatialcurrent/go-simple-serializer/blob/master/LICENSE)\n\n# go-simple-serializer\n\n# Description\n\n**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.\n\nUsing 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.\n\n**Formats**\n\nGSS 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.\n\n**Packages**\n\nThe 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.\n\n# Usage\n\n**CLI**\n\nThe command line tool, `gss`, can be used to easily convert data between formats.  We currently support the following platforms.\n\n| GOOS | GOARCH |\n| ---- | ------ |\n| darwin | amd64 |\n| linux | amd64 |\n| windows | amd64 |\n| linux | arm64 |\n\nPull requests to support other platforms are welcome!  See the [CLI.md](docs/CLI.md) document for detailed usage and examples.\n\n**Go**\n\nYou can install the go-simple-serializer packages with.\n\n\n```shell\ngo get -u -d github.com/spatialcurrent/go-simple-serializer/...\n```\n\nYou can then import the main public API with `import \"github.com/spatialcurrent/go-simple-serializer/pkg/gss\"` or one of the underlying packages, e.g., `import \"github.com/spatialcurrent/go-simple-serializer/pkg/tags\"`.\n\nSee [go-simple-serializer](https://godoc.org/github.com/spatialcurrent/go-simple-serializer) in GoDoc for API documentation and examples.\n\n**Node**\n\nGSS is built as a module.  In modern JavaScript, the module can be imported using [destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment).\n\n```javascript\nconst { serialize, deserialize, convert, formats } = require('./dist/gss.mod.min.js');\n```\n\nIn legacy JavaScript, you can use the `gss.global.js` file that simply adds `gss` to the global scope.\n\n**Android**\n\nThe `go-simple-serializer` code is available for use in Android applications under `com.spatialcurrent.gss`.  For example,\n\n```java\nimport com.spatialcurrent.gss.Gss;\n...\n  String output_format = Gss.convert(input_string, input_format, input_header, input_comment, output_format, verbose);\n...\n```\n\n**C**\n\nA variant of the `Convert` function is exported in a Shared Object file (`*.so`), which can be called by `C`, `C++`, and `Python` programs on Linux machines.  For complete patterns for `C`, `C++`, and `Python`, see the `examples` folder in this repo.\n\n# Releases\n\n**go-simple-serializer** is currently in **alpha**.  See releases at https://github.com/spatialcurrent/go-simple-serializer/releases.  See the **Building** section below to build from scratch.\n\n**JavaScript**\n\n- `gss.global.js`, `gss.global.js.map` - JavaScript global build  with source map\n- `gss.global.min.js`, `gss.global.min.js.map` - Minified JavaScript global build with source map\n- `gss.mod.js`, `gss.mod.js.map` - JavaScript module build  with source map\n- `gss.mod.min.js`, `gss.mod.min.js.map` - Minified JavaScript module with source map\n\n**Darwin**\n\n- `gss_darwin_amd64` - CLI for Darwin on amd64 (includes `macOS` and `iOS` platforms)\n\n**Linux**\n\n- `gss_linux_amd64` - CLI for Linux on amd64\n- `gss_linux_amd64` - CLI for Linux on arm64\n- `gss_linux_amd64.h`, `gss_linuxamd64.so` - Shared Object for Linux on amd64\n- `gss_linux_armv7.h`, `gss_linux_armv7.so` - Shared Object for Linux on ARMv7\n- `gss_linux_armv8.h`, `gss_linux_armv8.so` - Shared Object for Linux on ARMv8\n\n**Windows**\n\n- `gss_windows_amd64.exe` - CLI for Windows on amd64\n\n# Examples\n\n**CLI**\n\n`.gitignore` file to jsonl\n\n```shell\ncat .gitignore | gss -i csv --input-header path -o json\n```\n\nGet language from [CircleCI](https://circleci.com/) config.\n\n```shell\ncat .circleci/config.yml | gss -i yaml -o json -c '#' | jq -r .version\n```\n\nConvert list of files to JSON Lines\n\n```shell\nfind . -name '*.go' | gss -i csv --input-header path -o jsonl\n```\n\n**Go**\n\nSee the examples in [GoDoc](https://godoc.org/github.com/spatialcurrent/go-simple-serializer).\n\n**C**\n\nSee the `examples/c/main.c` file.  You can run the example with `make run_example_c`.\n\n**C++**\n\nSee the `examples/cpp/main.cpp` file.  You can run the example with `make run_example_cpp`.\n\n**Python**\n\nSee the `examples/python/test.py` file.  You can run the example with `make run_example_python`.\n\n**JavaScript**\n\nSee the `examples/js/index.js` file.  You can run the example with `make run_example_javascript`.\n\n# Building\n\nUse `make help` to see help information for each target.\n\n**CLI**\n\nThe `make build_cli` script is used to build executables for Linux and Windows.\n\n**JavaScript**\n\nYou can compile GSS to pure JavaScript with the `make build_javascript` script.\n\n**Android**\n\nThe `make build_android` script is used to build an [Android Archive](https://developer.android.com/studio/projects/android-library) (AAR) file and associated Javadocs.\n\n**Shared Object**\n\nThe `make build_so` script is used to build a Shared Object (`*.go`), which can be called by `C`, `C++`, and `Python` on Linux machines.\n\n**Changing Destination**\n\nThe default destination for build artifacts is `go-simple-serializer/bin`, but you can change the destination with an environment variable.  For building on a Chromebook consider saving the artifacts in `/usr/local/go/bin`, e.g., `DEST=/usr/local/go/bin make build_cli`\n\n# Testing\n\n**CLI**\n\nTo 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=\u003cYOUR TEMP DIRECTORY HERE\u003e`. For example:\n\n```\nTMPDIR=\"/usr/local/tmp\" make test_cli\n```\n\n**Go**\n\nTo 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).\n\n**JavaScript**\n\nTo run JavaScript tests, first install [Jest](https://jestjs.io/) using `make deps_javascript`, use [Yarn](https://yarnpkg.com/en/), or another method.  Then, build the JavaScript module with `make build_javascript`.  To run tests, use `make test_javascript`.  You can also use the scripts in the `package.json`.\n\n# Contributing\n\n[Spatial Current, Inc.](https://spatialcurrent.io) is currently accepting pull requests for this repository.  We'd love to have your contributions!  Please see [Contributing.md](https://github.com/spatialcurrent/go-simple-serializer/blob/master/CONTRIBUTING.md) for how to get started.\n\n# License\n\nThis work is distributed under the **MIT License**.  See **LICENSE** file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatialcurrent%2Fgo-simple-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspatialcurrent%2Fgo-simple-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspatialcurrent%2Fgo-simple-serializer/lists"}