intValue static method

VlJson intValue(
  1. int value
)

Builds a JSON number that prints without a fraction, so 5 stays 5.

JSON has one number type; the text does not. A count written with this prints as a count.

value The whole number.

Returns A number value that remembers it was written as an integer.

See also numberValue.

Implementation

static VlJson intValue(int value) {
  VlJson v =  VlJson();
  v.kind = 2;
  v.num = value.toDouble();
  v.isInt = true;
  return v;
}