Can I use the JSON API instead of building a plugin?

You can only declare new custom fields (and serialize them) in a plugin