Get this value as a Int

require: self.is_numeric

assert "-10".to_json_value.to_i == -10
assert "123".to_json_value.to_i == 123
assert "123.456".to_json_value.to_i == 123

Property definitions

json $ JsonValue :: to_i
	# Get this value as a `Int`
	#
	# require: `self.is_numeric`
	#
	#     assert "-10".to_json_value.to_i == -10
	#     assert "123".to_json_value.to_i == 123
	#     assert "123.456".to_json_value.to_i == 123
	fun to_i: Int
	do
		var value = value
		assert value isa Numeric
		return value.to_i
	end
lib/json/dynamic.nit:85,2--97,4