diff options
Diffstat (limited to 'doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.src/M000106.html')
-rw-r--r-- | doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.src/M000106.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.src/M000106.html b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.src/M000106.html new file mode 100644 index 0000000..cbb07fa --- /dev/null +++ b/doc/classes/JSON/Ext/Generator/GeneratorMethods/Object.src/M000106.html @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + <title>to_json (JSON::Ext::Generator::GeneratorMethods::Object)</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <link rel="stylesheet" href="../../../../../.././rdoc-style.css" type="text/css" media="screen" /> +</head> +<body class="standalone-code"> + <pre>/* + * call-seq: to_json(*) + * + * Converts this object to a string (calling #to_s), converts + * it to a JSON string, and returns the result. This is a fallback, if no + * special method #to_json was defined for some object. + */ +static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self) +{ + VALUE state, depth; + VALUE string = rb_funcall(self, i_to_s, 0); + rb_scan_args(argc, argv, "02", &state, &depth); + Check_Type(string, T_STRING); + state = cState_from_state_s(cState, state); + return cState_partial_generate(state, string, depth); +}</pre> +</body> +</html>
\ No newline at end of file |