Class GsonLazilyParsedNumberPyAdapter
java.lang.Object
org.python.core.adapter.ClassAdapter
com.inductiveautomation.ignition.common.script.adapters.GsonLazilyParsedNumberPyAdapter
- All Implemented Interfaces:
org.python.core.adapter.PyObjectAdapter
public class GsonLazilyParsedNumberPyAdapter
extends org.python.core.adapter.ClassAdapter
Adapts Gson's
LazilyParsedNumber to an appropriate Python numeric type (Long or Double)
by parsing its string representation.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.python.core.adapter.ClassAdapter
canAdapt, getAdaptedClass
-
Constructor Details
-
GsonLazilyParsedNumberPyAdapter
public GsonLazilyParsedNumberPyAdapter()
-
-
Method Details
-
adapt
Attempts to parse the number as a Long first, falling back to Double if parsing fails.
-