json#

2026-03-11

20 min read time

Applies to Linux

class pylibhipdf.json.GetJsonObjectOptions(allow_single_quotes=False, *, strip_quotes_from_single_strings=True, missing_fields_as_nulls=False)#

Bases: object

Settings for get_json_object()

__init__(*args, **kwargs)#
get_allow_single_quotes(self)#

Returns true/false depending on whether single-quotes for representing strings are allowed.

Returns#

bool

true if single-quotes are allowed, false otherwise.

get_missing_fields_as_nulls(self)#

Whether a field not contained by an object is to be interpreted as null.

Returns#

bool

true if missing fields are interpreted as null.

get_strip_quotes_from_single_strings(self)#

Returns true/false depending on whether individually returned string values have their quotes stripped.

Returns#

bool

true if individually returned string values have their quotes stripped.

set_allow_single_quotes(self, bool val)#

Set whether single-quotes for strings are allowed.

Parameters#

valbool

Whether to allow single quotes

Returns#

None

set_missing_fields_as_nulls(self, bool val)#

Set whether missing fields are interpreted as null.

Parameters#

valbool

Whether to treat missing fields as nulls.

Returns#

None

set_strip_quotes_from_single_strings(self, bool val)#

Set whether individually returned string values have their quotes stripped.

Parameters#

valbool

Whether to strip quotes from single strings.

Returns#

None

pylibhipdf.json.get_json_object(Column col, Scalar json_path, GetJsonObjectOptions options=None, Stream stream=None) Column#

Apply a JSONPath string to all rows in an input strings column.

For details, see cudf::get_json_object()

Parameters#

colColumn

The input strings column. Each row must contain a valid json string.

json_pathScalar

The JSONPath string to be applied to each row.

optionsGetJsonObjectOptions

Options for controlling the behavior of the function.

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New strings column containing the retrieved json object strings.