Benchmark of Rails and PostgreSQL JSON generation techniques