Top Description Inners Fields Constructors Methods
org.python.modules._json

public Class _json

extends Object
implements ClassDictInit
Class Inheritance
All Implemented Interfaces
org.python.core.ClassDictInit
Imports
org.python.core.ArgParser, .ClassDictInit, .Py, .PyBuiltinFunctionNarrow, .PyList, .PyObject, .PyString, .PyTuple, .PyUnicode, .codecs, .Untraversable, org.python.expose.ExposedGet, java.util.Iterator

This module is a nearly exact line by line port of _json.c to Java. Names and comments are retained to make it easy to follow, but classes and methods are modified to following Java calling conventions. (Retained comments use the standard commenting convention for C.)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static final PyString
private static PyObject
public static final PyObject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static void
_write_char(StringBuilder builder, int c)

private static void
_write_hexchar(StringBuilder builder, int c)

private static PyString
private static PyString
public static void
pack-priv static PyString
private static synchronized PyObject
pack-priv static void
pack-priv static void
raise_errmsg(String msg, PyObject s, int pos)

pack-priv static void
pack-priv static PyTuple
scanstring(PyString pystr, int end, String encoding, boolean strict)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

__doc__back to summary
public static final PyString __doc__
errmsg_fnback to summary
private static PyObject errmsg_fn
moduleback to summary
public static final PyObject module

Constructor Detail

_jsonback to summary
public _json()

Method Detail

_ascii_escape_charback to summary
private static void _ascii_escape_char(StringBuilder builder, int c)
_write_charback to summary
private static void _write_char(StringBuilder builder, int c)
_write_hexcharback to summary
private static void _write_hexchar(StringBuilder builder, int c)
ascii_escapeback to summary
private static PyString ascii_escape(PyUnicode pystr)
ascii_escapeback to summary
private static PyString ascii_escape(PyString pystr)
classDictInitback to summary
public static void classDictInit(PyObject dict)
encode_basestring_asciiback to summary
pack-priv static PyString encode_basestring_ascii(PyObject pystr)
get_errmsg_fnback to summary
private static synchronized PyObject get_errmsg_fn()
raise_errmsgback to summary
pack-priv static void raise_errmsg(String msg, PyObject s)
raise_errmsgback to summary
pack-priv static void raise_errmsg(String msg, PyObject s, int pos)
raise_errmsgback to summary
pack-priv static void raise_errmsg(String msg, PyObject s, PyObject pos, PyObject end)
scanstringback to summary
pack-priv static PyTuple scanstring(PyString pystr, int end, String encoding, boolean strict)
org.python.modules._json back to summary

pack-priv Class _json.EncodeBasestringAsciiFunction

extends PyBuiltinFunctionNarrow
Class Inheritance
Annotations
@Untraversable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject
the single argument to the function.
pystr
)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

A variant of the __call__ method with one argument.

public PyObject
Inherited from org.python.core.PyBuiltinFunctionNarrow:
__call____call____call____call____call____call__fancyCall

Constructor Detail

EncodeBasestringAsciiFunctionback to summary
pack-priv EncodeBasestringAsciiFunction()

Method Detail

__call__back to summary
public PyObject __call__(PyObject pystr)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

A variant of the __call__ method with one argument. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
pystr:PyObject

the single argument to the function.

Annotations
@Override
getModuleback to summary
public PyObject getModule()

Overrides org.python.core.PyBuiltinCallable.getModule.

Annotations
@Override
org.python.modules._json back to summary

pack-priv Class _json.ScanstringFunction

extends PyBuiltinFunctionNarrow
Class Inheritance
Annotations
@Untraversable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public PyObject
__call__(PyObject
the first argument to the function.
s
,
PyObject
the second argument to the function.
end
)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

A variant of the __call__ method with two arguments.

public PyObject
__call__(PyObject
the first argument to the function.
s
,
PyObject
the second argument to the function.
end
,
PyObject
the third argument to the function.
encoding
)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

A variant of the __call__ method with three arguments.

public PyObject
__call__(PyObject[]
all arguments to the function (including keyword arguments).
args
,
String[]
the keywords used for all keyword arguments.
kwds
)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

The basic method to override when implementing a callable object.

public PyObject
__call__(PyObject
the first argument to the function.
s
,
PyObject
the second argument to the function.
end
,
PyObject
the third argument to the function.
encoding
,
PyObject
the fourth argument to the function.
strict
)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

A variant of the __call__ method with four arguments.

public PyObject
Inherited from org.python.core.PyBuiltinFunctionNarrow:
__call____call____call__fancyCall

Constructor Detail

ScanstringFunctionback to summary
pack-priv ScanstringFunction()

Method Detail

__call__back to summary
public PyObject __call__(PyObject s, PyObject end)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

A variant of the __call__ method with two arguments. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
s:PyObject

the first argument to the function.

end:PyObject

the second argument to the function.

Annotations
@Override
__call__back to summary
public PyObject __call__(PyObject s, PyObject end, PyObject encoding)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

A variant of the __call__ method with three arguments. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
s:PyObject

the first argument to the function.

end:PyObject

the second argument to the function.

encoding:PyObject

the third argument to the function.

Annotations
@Override
__call__back to summary
public PyObject __call__(PyObject[] args, String[] kwds)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

The basic method to override when implementing a callable object. The first len(args)-len(keywords) members of args[] are plain arguments. The last len(keywords) arguments are the values of the keyword arguments.

Parameters
args:PyObject[]

all arguments to the function (including keyword arguments).

kwds:String[]

the keywords used for all keyword arguments.

Annotations
@Override
__call__back to summary
public PyObject __call__(PyObject s, PyObject end, PyObject encoding, PyObject strict)

Overrides org.python.core.PyBuiltinFunctionNarrow.__call__.

Doc from org.python.core.PyObject.__call__.

A variant of the __call__ method with four arguments. The default behavior is to invoke __call__(args, keywords) with the appropriate arguments. The only reason to override this function would be for improved performance.

Parameters
s:PyObject

the first argument to the function.

end:PyObject

the second argument to the function.

encoding:PyObject

the third argument to the function.

strict:PyObject

the fourth argument to the function.

Annotations
@Override
getModuleback to summary
public PyObject getModule()

Overrides org.python.core.PyBuiltinCallable.getModule.

Annotations
@Override