fixed wrong serialization of objects with default toString()

Objects that use the default toString() method will not create usefull serialized output so we make JSON out of them.
Also we now allow Arrays to be serialized to JSON this way too as the array datatype will not cover Arrays of objects with a default toString() method.
made serializing of arrays for 'object' datatype work
fields for object and array datatypes are now created
Merge pull request #39 from der-On/master

various fixes to postgres adapter