Package dev.gmitch215.bytebox.json
Interface Codec<T>
- Type Parameters:
T- the type
public interface Codec<T>
Converts one type to and from a JavaScript value.
Written by the Gradle plugin for every type it was told to generate one for, and registrable by hand for anything it cannot see. There is no reflective fallback: the compiler emits only what a program reaches, so a decoder discovered at runtime would need metadata for every field of every type that might arrive, which is the closure dead-code elimination exists to avoid.
- Since:
- 1.0.0
-
Method Summary
-
Method Details
-
decode
Reads a value.- Parameters:
value- the JavaScript value- Returns:
- the Java value
-
encode
Writes a value.- Parameters:
value- the Java value- Returns:
- the JavaScript value
-