8 ms·
The way around this is to have a layered approach in the backend. A business logic layer which generates some data, presumably structured in whatever way is can
by hannofcart 3y ago
The way around this is to have a layered approach in the backend. A business logic layer which generates some data, presumably structured in whatever way is canonical for the language you use.
Then add a layer on top of that that 'renders' the same structure into multiple formats: JSON or HTML as needed.
Expose each of these view layers as a different endpoint in your service.