Learning from examples
Now that you have looked at the Microsoft List column formatting and view formatting schemas, it's time to start learning how to build your own JSON. There is nothing better than learning from real examples that are described and then exemplified.
Quick Tip
In the Microsoft 365 Patterns and Practices (PnP) open source repository, you can find numerous templates that you can use in your own lists or use as a starting point to build your own view formatting.
The column samples repository is available at https://github.com/pnp/sp-dev-list-formatting/tree/master/view-samples.
Conditional view formatting
One of the simplest view formattings you can do is create a custom alternate row formatting. The following code formats the even rows with a background color.
This example can also be achieved in design mode. However, by using JSON, you can customize it even further:
{ "$schema": "https://developer.microsoft.com...