Fixed posting

also added function for spaceless json that doesn't support arrays