Basic JSON serializer