Get this value as a Numeric

require: self.is_numeric

assert "1.234".to_json_value.to_numeric == 1.234
assert "1234".to_json_value.to_numeric == 1234

Property definitions

json $ JsonValue :: to_numeric
	# Get this value as a `Numeric`
	#
	# require: `self.is_numeric`
	#
	#     assert "1.234".to_json_value.to_numeric == 1.234
	#     assert "1234".to_json_value.to_numeric == 1234
	fun to_numeric: Numeric
	do
		if is_int then return to_i
		return to_f
	end
lib/json/dynamic.nit:128,2--138,4