Fixefid is a Java library for working with flat fixed formatted text files and CSV files.
A lot of improvements has been carried out:
Validation: now it’s possibile to obtain the validation info of all fields. That’s simplify the error management. For instance, if something goes wrong during the processing of the input string, no exception is thrown, and it’s possibile to obtain the validation error info of all fields.
Annotation: all configurations can be managed with annotations. The extended properties style has been maintained but only for advanced configuration, like call back needs.
Valid values accepted list in field annotation
Enum style: it’s been deprecated and not longer supported
Using a REST Service for converting fixed fields text record to json with Fixedfid java library.
Converting fixed fields text record to JSON can be realized in many ways. A solution can be the using of a REST Service combined with the Fixefid java library.
The environment is as a follows:
Spring Boot 2.3.4.RELEASE
Spring Doc Openapi 1.5.0
The Fixefid java library permits to define a fixed fields text record with Java Bean or Java Enum. In this case the definition by Java Bean can be used to annotate a resource representation class of a REST Service.
For instance, we want converting a customer record like this one:
String record = "0000000000000000001Paul Robinson ";