Generic predicates and functions should be able to dynamically deserialise JSON fields #67
Labels
enhancement
Improvement to existing functionality/feature
Milestone
Currently if you deserialise:
it will throw an exception saying 1512381090096 is bigger than MAX integer. It should use Long by default.
When used in Gaffer, the Gaffer schema defines the class types for the IsMoreThan value field. We should allow users in Gaffer to write the above json and automatically deserialise the value field into a custom class, like a Date, without requiring the user to provide the class like:
We have a method: InputValidator.isInputValid. This takes in classes and checks the predicate's field match the classes. If we pass in a Date class, then we should be able to convert the above long into a Date using JSON serialisation. For example, in the IsMoreThan class:
We could create an interface:
And for any classes that have jsonSubType annotations on fields implement it with something like the above code.
The text was updated successfully, but these errors were encountered: