WhiteflagProtocol / whiteflag-java

Implementation of the Whiteflag protocol for Java development
https://java.whiteflagprotocol.org
Other
2 stars 1 forks source link

Field data conversion #6

Open ts5746 opened 3 years ago

ts5746 commented 3 years ago

Description

Provide conversion for common Java data formats to Whiteflag field format.

Rationale

Whiteflag processes all data as strings, but data might be available as Java objects (time, geolocation, etc.).

Solution

Provide conversion classes in the org.whiteflag.protocol.util package, which may be used when setting field values.

Specification

When providing field data other than a string, the library tries to convert the provided data.

Affected components

To be determined.

Alternatives

The alternative is not doing any conversion. This means that other developers have to do it themselves. That makes Whiteflag less easy to integrate and/or may result in conversion errors in other implementations.