damnwidget / cbor Goto Github PK
View Code? Open in Web Editor NEWExtensive Golang implementation of Concise Binary Object Representation (CBOR RFC7049) encoder and decoder
License: Apache License 2.0
Extensive Golang implementation of Concise Binary Object Representation (CBOR RFC7049) encoder and decoder
License: Apache License 2.0
consider testing against https://github.com/cbor/test-vectors this makefile will help:
build:
go build
test: deps
go test
deps: test-vectors
test-vectors:
@echo "installing test-vectors"
git clone https://github.com/cbor/test-vectors
take a look at ugorji/go#86 (comment) -- i updated it with support for this module. but the encoder doesn't seem to output anything:
> random-json -o -c 1 | ./json2cbor --codec dw j2c
> random-json -o -c 1 | ./json2cbor --codec dw j2c | wc
1 0 1
> random-json -o -c 1 | ./json2cbor --codec ugorji j2c | wc
1 4 140
> random-json -o -c 1 | ./json2cbor --codec ugorji j2c
�j5
HP]WXg�a��� g��A/sB:����^z�xq�="�x�)���M��Mw46E�(�V����8��*������=�O$8�e����d�/�bޙ�s$��3�...
> go test
--- FAIL: TestDecodeEpochDateTime (0.00s)
common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeEpochDateTimeFromInterface (0.00s)
common_test.go:34: TestTake: expected 18, got 10
--- FAIL: TestDecodeNegativeEpochDateTimeFromInterface (0.00s)
common_test.go:34: TestTake: expected 20, got 11
[]byte{0xa6, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x63, 0x41, 0x67, 0x65, 0x18, 0x22, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x31, 0x49, 0x34, 0x20, 0x43, 0x42, 0x4f, 0x52, 0x20, 0x53, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x40, 0x67, 0x4d, 0x61, 0x72, 0x72, 0x69, 0x65, 0x64, 0xf4, 0x66, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0xfb, 0x3f, 0xfc, 0x51, 0xeb, 0x85, 0x1e, 0xb8, 0x52}
FAIL
exit status 1
FAIL github.com/DamnWidget/cbor 0.015s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.