Commits on Oct 30, 2012
  1. Normalize whitespace in Makefile

    davisp committed with Dave Cottlehuber Oct 23, 2012
  2. Add PHONY targets for safety

    Just trying to be a bit more thorough in the Makefile targets.
    davisp committed with Dave Cottlehuber Oct 23, 2012
  3. Add a distclean target for Make

    This runs a `git clean -fxd` to revert to a pristine Git clone.
    davisp committed with Dave Cottlehuber Oct 23, 2012
  4. Use the Git protocol for PropEr

    I've had reports that HTTPS seems to fail a bit more often than the Git
    URLs. I've seen this before as well so I've gone ahead and switched
    protocols for the clone.
    davisp committed with Dave Cottlehuber Oct 23, 2012
Commits on Oct 24, 2012
  1. adjust rebar.config to support rebar v2.0 release

    - include WINDOWS preprocessor definitions that rebar is missing
    - minor changes to optimisation flags
    Dave Cottlehuber committed Oct 24, 2012
Commits on Sep 25, 2012
  1. catch nif load error

    benoitc committed Sep 25, 2012
Commits on Jun 7, 2012
  1. Fix code reloading for Jiffy

    As it turns out I did not understand the documenation for
    load/upgrade/unload correctly. load/upgrade are called conditionally if
    there's code in the VM for the NIF. Ie, no code means load is called,
    where as if code exists, upgrade is called.
    unload is called regardless once per load/unload. This means that
    load/upgrade in Jiffy's case will each create a state object and unload
    will free it each time. I was missing the fact that unload is called
    every time and hence I don't need to clear the state in upgrade.
    davisp committed Jun 7, 2012
  2. Be paranoid about the values sent to upgrade

    The docs aren't entirely clear on the order of calls for upgrades so
    this is mostly just in case old_priv ever happens to not be what load
    returned in priv.
    davisp committed Jun 7, 2012
  3. Fix hot code upgrades

    davisp committed Jun 7, 2012
Commits on Jun 5, 2012
  1. Update rebar to 2.0.0

    davisp committed Jun 5, 2012
Commits on Jun 1, 2012
  1. Add an option to ignore UTF-8 encoding errors

    By default Jiffy is quite strict in what it encodes. By default it will
    not allow invalid UTF-8 to be produced. This can cause issues when
    attempting to encode JSON that was decoded by other libraries as UTF-8
    semantics are not uniformly enforced.
    This patch adds an option 'force_utf8' to the encoder. If encoding hits
    an error for an invalid string it will forcefully mutate the object to
    contain only valid UTF-8 and return the resulting encoded JSON.
    For the most part this means it will strip any garbage data from
    binaries replacing it replacement codepoint U+FFFD. Although, it will
    also try and the common error of encoding surrogate pairs as three-byte
    sequences and reencode them into UTF-8 properly.
    davisp committed Jun 1, 2012
Commits on Apr 25, 2012
  1. Update rebar and the Makefile

      * Update rebar to a more recent version
      * Update rebar.config for deprecation warnings
      * Allow people to export the REBAR environment variable to use
        their own version of rebar
      * Fixed `make clean`
    benoitc committed with davisp Apr 20, 2012
  2. Windows: MSVC compatibility

    committed with davisp Apr 8, 2012
  3. Fix segfaul when encoding with the uescape option

    There was a bug that was resetting the extra amount of space needed when
    encoding unicode characters with the `uescape` option enabled.
    davisp committed Apr 25, 2012
Commits on Apr 23, 2012
  1. Cleanup Makefile

    davisp committed Apr 23, 2012
Commits on Mar 21, 2012
  1. Fix silly error in the README

    davisp committed Mar 21, 2012
Commits on Mar 15, 2012
  1. Fix uescapes for combining characters

    I had a silly direction mistake in a bit shift that was causing the high
    portion of all combining characters to be printed as \uD800 which is
    obviously wrong. This bug only affects people using the non-default
    uescape option during encoding.
    davisp committed Mar 15, 2012
Commits on Feb 25, 2012
  1. Updated rebar to latest master

    davisp committed Feb 25, 2012
Commits on Feb 13, 2012
  1. Ensure that encoded doubles have a decimal point

    Numbers like 1.0 were being encoded as <<"1">> which can lead to a bit
    of confusion. This merely checks if a decimial point exists and if not
    it appends ".0" to the value.
    davisp committed Feb 12, 2012
Commits on Jan 10, 2012
Commits on Jan 8, 2012
  1. Add pretty print

    jiffy:encode/2 now accepts a 'pretty' option that will format the JSON
    output using two-space indents.
    urbanserj committed with davisp Dec 11, 2011
  2. Reduce PropEr test size for speed

    I need to fix this so that object sizes don't explode when generating
    larger values. Basically, as the type generator recurses is should be
    adjusting the size value.
    davisp committed Jan 8, 2012
  3. clean test/*.beam

    benoitc committed with davisp Jan 3, 2012
  4. Adjust number ranges to show bignum support

    Looks like there's a slight difference in the number of significant
    digits supported across platforms in strtod. This just adds a couple to
    force it into the bignum code.
    davisp committed Jan 8, 2012
Commits on Nov 14, 2011
  1. Remove atom generation

    Not only was I not actually sending atoms to Jiffy, the test will end up
    exhausting the atom table and crashing the Erlang VM.
    davisp committed Nov 14, 2011
  2. Implement PropEr tests for JSON parsing

    Big thanks to Dmitry Groshev [1] for help getting PropEr tests into
    Jiffy. These generate valid EJSON to check parsing as well as check
    that random inputs don't cause segfaults or other nasty effects.
    Future improvements would be to write a JSON generator as well as a
    version that introduces known errors into the binary for checking known
    parsing errors as well.
    Fixes: #10
    davisp committed Nov 14, 2011
Commits on Nov 13, 2011
  1. Change test case file extension

    Rebar's eunit command wants to try and compile anything named *.erl in
    the tests/ directory which causes errors with the test expectation
    files. Rather than write a patch for rebar it was easier to just rename
    davisp committed Nov 13, 2011
Commits on Oct 31, 2011
  1. Fix test plan for 004-strings.t

    davisp committed Oct 31, 2011
  2. Remove trailing whitespace

    davisp committed Oct 31, 2011
  3. Enforce Unicode constraints more strictly

    It was possible to pass some types of invalid UTF-8 through Jiffy's
    encoder. Specifically, if uescaping isn't used, values that would decode
    from 0xD800 to 0xDFFFF, 0xFFFE, 0xFFFF, and values greater than 0x10FFFF
    would not be flagged as invalid. Now they are.
    davisp committed Oct 31, 2011