Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pierre/libsmile
C Streaming parser for Smile ( http://wiki.fasterxml.com/JacksonBinaryFormatSpec )
https://github.com/pierre/libsmile
Last synced: 15 days ago
JSON representation
C Streaming parser for Smile ( http://wiki.fasterxml.com/JacksonBinaryFormatSpec )
- Host: GitHub
- URL: https://github.com/pierre/libsmile
- Owner: pierre
- Created: 2011-02-04T14:43:00.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T06:29:07.000Z (over 4 years ago)
- Last Synced: 2024-10-14T20:53:58.702Z (28 days ago)
- Language: C
- Homepage: http://github.com/brianm/libsmile
- Size: 486 KB
- Stars: 30
- Watchers: 4
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE-2.0.txt
Awesome Lists containing this project
README
== Libsmile
C implementation of the Smile binary format (http://wiki.fasterxml.com/SmileFormatSpec).
The library ships with a command line tool (unsmile) to decode binary files on the command line, as well as extensions for scripting languages.
=== Status
libsmile is under heavy development and is still considered experimental.
What is working:
* Single block decoding smile -> json (up to 64k by default, size can be increased)
* Shared String references (see below for caveat)
* Basic PHP, Ruby and Python supportWhat is missing:
* The following decoding use cases are not yet supported due to lack of test data (feel free to contribute json/smile samples, see data/ directory): long String, long Shared String reference for Keys decoding, BigInteger, long Unicode String, long Shared String reference, Binary, Raw Binary for Values decoding
* Streaming support: API has been designed to do chunk decoding, but is not yet functional (only single chunk for now between reset)
* Encoding support json -> smile=== C library build
To build libsmile.la:
make
To run tests:
make check
=== Extensions build
To build extensions:
make
To run tests:
make check-
where ext is php, ruby or py.
== Usage
=== unsmile
libsmile $ ./unsmile
usage: unsmileFor example:
libsmile $ ./unsmile data/smile/test1.smile
{"test key":true,"nullField":null,"foo":1,"foo2":{"a":3},"aãb":-323,"2":[1,2,3],"\"foo\"":"foo\nbar"}=== C Library
The API can be found under include/smile.h. A good starting point is tools/unsmile.c for a working example.
= License (see LICENSE-2.0.txt file for full license)
Copyright 2011 Pierre-Alexandre Meyer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.