implement JSON serializer

JSON serializer implemented