Converts a unsafe.JValue to a Javascript object/value that can be used within Javascript
Converts a unsafe.JValue to a Javascript object/value that can be used within Javascript
Converts a unsafe.JValue to a ast.JValue.
Converts a unsafe.JValue to a ast.JValue. Note that when converting unsafe.JNumber, this can throw runtime error if the underlying string representation is not a correct number. Also when converting a ast.JObject to a ast.JObject, its possible to lose data if you have duplicate keys.
Represents a JSON number value.
If you are passing in a NaN or Infinity as a Double, unsafe.JNumber will contain "NaN" or "Infinity" as a String which means it will cause issues for users when they use the value at runtime. It may be preferable to check values yourself when constructing unsafe.JValue to prevent this. This isn't checked by default for performance reasons.