Structs and maps are easy to work with in Elixir, but if they are stored in the database as JSON and accessed via an Ecto Schema, it’s not as clear how to query them. We’re going to explore how to do that, and make it clear and easy.
You can use PostgreSQL’s JSON data types to store embedded data on Ecto models. But the way Ecto tells you to store it might not be the best way.
Validate your client-server contracts with
Use RSpec and JSON Schema to create a test-driven process in which changes to the structure of your JSON API drive the implementation of new features.