ARD was created as a way of deserialising chunks of text (HTML, but applies to other structured text as well) by annotating POJOs with Regex matchers.
Warning
|
This is garbage work in progress |
Annotate your properties like so
@ObjectExpression("^.+$")
public class MySimplePojo {
@FieldExpression("[Ff]irst.+[Pp]roperty")
public String firstProperty;
@FieldExpression("[Ss]econd.+[Pp]roperty")
private String secondProperty;
public void setSecondProperty(String value) {
this.secondProperty = value;
}
}
@FieldExpression
- required annotation to capture value from input
@ObjectExpression
- optional annotation to limit scope of capture from input