Code Location:

Ohloh Project Analysis
Basic Information
Code Locations: 1
SCM Types: Subversion   
Files: 6
Lines Of Code: 434
Published On: May 25, 2013 (09:12 AM)
Provide serialization and de-serialization of Google's protobuf Messages into/from JSON format. protobuf-json is written in python and depends on Google's protobuf compiler for python. This code is nither readable nor efficient. But it is in production without changes for six month by now. I will rewrite it in style of GPB python reflection as soon as i will have some free time. Quick ExampleUsing .proto file like this: message Person { required int32 id = 1; required string name = 2; optional string email = 3; }You can encod and decode it to/from json: { "id": 123, "name": "person name", "email": "" }More complex example: message Book { required string title = 1; optional float price = 2; repeated Person authors = 3; } { "title": "Book example", "price": 12.7, "authors": [ { "id": 123, "name": "person name", "email": "" }, { "id": 456, "name": "another person", } ] }TodoFrom version 2.3.0 protobuf protoc supports a plugin system for code generators. Plugins can generate code for new languages. TODO: write JavaScript code generator
File Name LOCs Language
88 Python
103 Python
26 Other Languages
31 Python
180 Python
6 Python