rveen / ogdl

OGDL for Go
BSD 2-Clause "Simplified" License
37 stars 10 forks source link

Proposal: Let OGDL become an elegant but complete data representation of all Go data types. #1

Closed h12w closed 10 years ago

h12w commented 10 years ago

I'm quite excited about the potential that OGDL has. It might be able to become an elegant but complete data representation of all Go data types. (XML is ugly but JSON lacks enough ability, YAML is also too heavy).

The only format that is able to represent complete Go types is encoding/gob, but it is a binary format. Go just lacks a pretty text format to do it.

  1. OGDL can now support reference cycle, right? So pointer or interface is not a problem.
  2. It just need a standard way to represent map, array and struct, as extension to current OGDL standard.
  3. Then it can implements methods like Marshal, marshalIndent and Unmarshal as in encoding/json.

If you are interested in my proposal, I'd like to contribute to its implementation.

rveen commented 10 years ago

Hi, Hailiang. A very interesting proposal. I'm not sure OGDL is the best way to represent Go types, but the only way to be sure is to work on a proposal and implement it. The weakest point of OGDL is the cycle production, but it is not written in stone. So if you can work out a proposal, that would be great. You can do that here or, maybe better, in the ogdl-go list.