I was using "extend" in the general sense here, i.e. "add more stuff". I wasn't specifically talking about extending a class.
There's not much documentation on the JSON recipe system, so I'll briefly explain how to add custom recipe, ingredient and condition types.
To add a custom recipe type, first create a class that either extends an existing IRecipe implementation (e.g. ShapedRecipes) or implements IRecipe and extends IForgeRegistryEntry.Impl. You then create a class that implements IRecipeFactory and deserialises the custom recipe type from the provided JSON object.
To add a custom ingredient type, first create a class extends Ingredient or a subclass (skip this step if an existing Ingredient class provides the required functionality). You then create a class that implements IIngredientFactory and deserialises the custom ingredient type from the provided JSON object.
To add a custom condition type, create a class that implements IConditionFactory and deserialises the condition (a BooleanSupplier) from the provided JSON object. You can implement BooleanSupplier with a class (named or anonymous), lambda or method reference.
Create a file called _factories.json in assets/<modid>/recipes that specifies your IRecipeFactory, IIngredientFactory and IConditionFactory classes.
You can see some examples of custom recipe and ingredient implements here and some examples of the JSON files here.