stretchr / codecs Goto Github PK
View Code? Open in Web Editor NEWProvides interfaces, functions and codecs that can be used to encode/decode data to/from various formats.
Provides interfaces, functions and codecs that can be used to encode/decode data to/from various formats.
It's be cool if codecs could speak CSV for legacy reasons.
POST /resources.csv
header1,header2
row1value1,row1value2
row2value1,row2value2
row3value1,row3value2
and also reading...
GET /resources.csv
name,age,male
Mat,30,true
Sometimes an application may want to remove a codec from the default list.
Why do you encode/marshal into a freshly allocated []byte, and do you require a []byte for unmarshal? Even proper encodings/csv is hidden behind this memory-hungry, nonscalable interface...
Right now we are detecting the content type in a very dumb way. Go has built-in support for content type detection. We need to implement this in order to properly identify content types.
https://github.com/stretchr/codecs/blob/master/services/web_codec_service.go#L61 needs to implement http://golang.org/src/pkg/net/http/sniff.go?s=648:690#L11
I can used package is "gopkg.in/mgo.v2/bson"
https://github.com/stretchr/codecs/blob/master/bson/bson_codec.go#L5
import (
"github.com/stretchr/codecs/constants"
"labix.org/v2/mgo/bson"
)
โ
import (
"github.com/stretchr/codecs/constants"
"gopkg.in/mgo.v2/bson"
)
By default, should all codecs be installed?
// InstalledCodecs is an array of installed codec objects, initialized with the provided default codecs.
var InstalledCodecs []codecs.Codec = []codecs.Codec{new(json.JsonCodec), new(jsonp.JsonPCodec)}
.csv
and .xsl
)Currently, it panics if you do PublicDataMap
on a map[string]interface{}
, when really it could handle this easily enough.
Should we consider merging with this project?
package github.com/ugorji/go-msgpack has been deprecated (05/29/2013).
It will be retired anytime from July 1, 2013.
Please update to faster and much much better github.com/ugorji/go/codec.
See https://github.com/ugorji/go/tree/master/codec#readme for more information.
Add ability to get all installed codecs from service
Add CSV support
This:
name=Tyler&city=SLC
Should become an object like this:
{
name: "Tyler",
city: "SLC"
}
Called GetCodec
with application/json; charset=utf-8
will not match because it wants exactly application/json
.
No good for the real world (i.e web browsers)
Implement New number for JSON decoding so we don't always store float64
in the database.
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.