fixing attributes -> attributes and objects -> object for non-streamed objects.
test fixes
compacted json for sources, primary-key, inverse-lookup, type-filters, flags, query-strings, tags and moved it in to the Json class. Very repetitive, please improve