Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tiny implementation of JSON serialization

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 crock.gemspec
README.markdown

Crock

A tiny pure Ruby library to serialize JSON.

require 'crock'
JSON.generate([
  12, 'Café',
  {'on' => true}
]) # => '[12,"Café",{"on":true}]'

Why!?

  1. It's just one file and easy to drop in your project when you don't want gems
  2. It has a liberal license

Limitations

For the output to be valid all strings should be encoded in UTF-8 and only characters from the Basic Multilingual Plane are supported. Currently no special notations for floats are supported so serializing them might result in invalid JSON.


Crock was named in honor of Douglas Crockford. For other ethymology see your local dictionary.

Something went wrong with that request. Please try again.