Adding JSON Error serialization