Allow empty valid json objects in write api

Previously empty arrays or empty objects would cause a 400 because
they're falsy.