Fixed parsing of JSON strings when providing an object instance

JSON string parsing was failing when passing an object instance rather than a type, this was due to the `JSONDictionary` not being set - thus being inaccessible from within `map` functions.

Added a test case that fails without the fix and passes with it. The name of the test could probably be better...

Great library by the way, very simple to use!