Fixed config key
Fixed ClassCastException
Added ability to write JSON to a Writer