Interface JsonProvider<T>
- Type Parameters:
T- type of input
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides conversion to JSON of the input
-
Method Summary
-
Method Details
-
from
Convert the input object into JSON- Parameters:
json- the json source- Returns:
- a loaded
JsonNodefrom the source - Throws:
IOException- on load error
-
jsonFrom
Execute the provider, wrapping exceptions up as assertion failures- Parameters:
item- the item to unpack - this will be of typeTbut we allow it to beObjectas Hamcrest is poorly behaved with type safety- Returns:
- the loaded
JsonNodeor an assertion failure if the load failed, or the input is null
-