Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fcb5996969
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (14 sloc) 0.652 kb

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.

Jump to Line
Something went wrong with that request. Please try again.