https://github.com/ipfs/go-ipld-cbor
A cbor implementation of the go-ipld-format
https://github.com/ipfs/go-ipld-cbor
Last synced: about 1 year ago
JSON representation
A cbor implementation of the go-ipld-format
- Host: GitHub
- URL: https://github.com/ipfs/go-ipld-cbor
- Owner: ipfs
- License: mit
- Created: 2016-10-24T21:58:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-29T08:32:13.000Z (about 1 year ago)
- Last Synced: 2025-04-01T12:07:30.156Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 182 KB
- Stars: 34
- Watchers: 24
- Forks: 25
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-ipld-cbor
==================
[](http://ipn.io)
[](http://libp2p.io/)
[](http://webchat.freenode.net/?channels=%23ipfs)
[](https://coveralls.io/github/libp2p/js-libp2p-floodsub?branch=master)
[](https://travis-ci.org/libp2p/js-libp2p-floodsub)
> An implementation of a cbor encoded merkledag object.
## Status
This library **has alternatives available**: For new projects, prefer using the [cbor codec](https://github.com/ipld/go-ipld-prime/tree/master/codec/dagcbor) included with [go-ipld-prime](https://github.com/ipld/go-ipld-prime).
This library is in **standby** mode. It works, but we recommend migrating to alternatives if possible. New features are unlikely to be added here.
## Lead Maintainer
[Eric Myhre](https://github.com/warpfork)
## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Contribute](#contribute)
- [License](#license)
## Install
```sh
make install
```
## Usage
Note: This package isn't the easiest to use.
```go
// Make an object
obj := map[interface{}]interface{}{
"foo": "bar",
"baz": &Link{
Target: myCid,
},
}
// Parse it into an ipldcbor node
nd, err := WrapMap(obj)
fmt.Println(nd.Links())
```
## Contribute
PRs are welcome!
Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
## License
MIT © Jeromy Johnson