Fix JValue serialisation.