updated json serializer