Fixes the rest json writers to be more idiomatic