fixes to adding custom_types onto json output, inc test