NoneableDoubleAdapter

Moshi (de)serialization adapter for Double fields annotated NoneableDouble, registered on every Moshi.BuilderParser constructs.

fromJson parses Alpha Vantage's numeric-or-"None" string convention; toJson is unimplemented, since this library only reads Alpha Vantage responses and never serializes a Noneable-typed field back to JSON.

Author

Sylvester Sefa-Yeboah

Since

1.6.1

Constructors

Link copied to clipboard
public void NoneableDoubleAdapter()

Functions

Link copied to clipboard
public Double fromJson(String s)
Parses a JSON string field into a Double, per Alpha Vantage's numeric-or-"None" convention: a valid numeric string becomes its Double value, and any other string — including the literal "None" Alpha Vantage sends for an unavailable field — becomes null.
Link copied to clipboard
public Double toJson(Double l)
Always throws.