Note: Unlike withDefault path generation will still explicitly include the default value.
Eg. If the path is like "/file[.format]" and the default is JSON, "/file" will be read as "/file.json", but when generating a path with JSON this will generate "/file.json" instead of "/file".
Note: Unlike parseDefault this will affect path generation too.
Eg. If the path is like "/file[.format]" and the default is JSON, "/file" will be read as "/file.json", and when generating a path with JSON this will generate "/file" instead of "/file.json".
Make sure the type has a useful .equals() implementation. Example: default == default should be true.