@girs/json-1.0 1.7.1-3.2.6 → 1.7.1-3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/json-1.0.d.cts +59 -59
- package/json-1.0.d.ts +59 -59
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Json-1.0, generated from library version 1.7.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for Json-1.0, generated from library version 1.7.1 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.7.
|
|
9
9
|
|
|
10
10
|
JSON-GLib is a library for reading and parsing JSON using GLib and GObject data types and API.
|
|
11
11
|
|
package/json-1.0.d.cts
CHANGED
|
@@ -140,7 +140,7 @@ export const MINOR_VERSION: number
|
|
|
140
140
|
* The version of JSON-GLib, encoded as a string, useful for printing and
|
|
141
141
|
* concatenation.
|
|
142
142
|
*/
|
|
143
|
-
export const VERSION_S: string
|
|
143
|
+
export const VERSION_S: string
|
|
144
144
|
/**
|
|
145
145
|
* Checks whether it is possible to deserialize a `GBoxed` of
|
|
146
146
|
* type `gboxed_type` from a [struct`Json`.Node] of type `node_type`.
|
|
@@ -193,7 +193,7 @@ export function boxed_serialize(gboxed_type: GObject.GType, boxed: any | null):
|
|
|
193
193
|
* @param length length of the data stream (unused)
|
|
194
194
|
* @returns a new object instance of the given type
|
|
195
195
|
*/
|
|
196
|
-
export function construct_gobject(gtype: GObject.GType, data: string
|
|
196
|
+
export function construct_gobject(gtype: GObject.GType, data: string, length: number): GObject.Object | null
|
|
197
197
|
/**
|
|
198
198
|
* Parses the given string and returns the corresponding JSON tree.
|
|
199
199
|
*
|
|
@@ -204,7 +204,7 @@ export function construct_gobject(gtype: GObject.GType, data: string | null, len
|
|
|
204
204
|
* @param str a valid UTF-8 string containing JSON data
|
|
205
205
|
* @returns the root node of the JSON tree
|
|
206
206
|
*/
|
|
207
|
-
export function from_string(str: string
|
|
207
|
+
export function from_string(str: string): Node | null
|
|
208
208
|
/**
|
|
209
209
|
* Creates a new `GObject` instance of the given type, and constructs it
|
|
210
210
|
* using the members of the object in the given node.
|
|
@@ -228,7 +228,7 @@ export function gobject_deserialize(gtype: GObject.GType, node: Node): GObject.O
|
|
|
228
228
|
* @param length length of the data stream, or -1 if it is `NUL`-terminated
|
|
229
229
|
* @returns a new object instance of the given type
|
|
230
230
|
*/
|
|
231
|
-
export function gobject_from_data(gtype: GObject.GType, data: string
|
|
231
|
+
export function gobject_from_data(gtype: GObject.GType, data: string, length: number): GObject.Object | null
|
|
232
232
|
/**
|
|
233
233
|
* Creates a JSON tree representing the passed object instance.
|
|
234
234
|
*
|
|
@@ -296,7 +296,7 @@ export function gvariant_deserialize(json_node: Node, signature: string | null):
|
|
|
296
296
|
* @param signature A valid `GVariant` type string
|
|
297
297
|
* @returns A newly created `GVariant`D compliant
|
|
298
298
|
*/
|
|
299
|
-
export function gvariant_deserialize_data(json: string
|
|
299
|
+
export function gvariant_deserialize_data(json: string, length: number, signature: string | null): GLib.Variant | null
|
|
300
300
|
/**
|
|
301
301
|
* Converts `variant` to a JSON tree.
|
|
302
302
|
* @param variant A `GVariant` to convert
|
|
@@ -453,7 +453,7 @@ export interface BoxedSerializeFunc {
|
|
|
453
453
|
* @param member_node the value of the member
|
|
454
454
|
*/
|
|
455
455
|
export interface ObjectForeach {
|
|
456
|
-
(object: Object, member_name: string
|
|
456
|
+
(object: Object, member_name: string, member_node: Node): void
|
|
457
457
|
}
|
|
458
458
|
export module Serializable {
|
|
459
459
|
|
|
@@ -492,7 +492,7 @@ export interface Serializable {
|
|
|
492
492
|
* @param property_node the JSON node containing the serialized property
|
|
493
493
|
* @returns `TRUE` if the property was successfully deserialized
|
|
494
494
|
*/
|
|
495
|
-
default_deserialize_property(property_name: string
|
|
495
|
+
default_deserialize_property(property_name: string, value: any, pspec: GObject.ParamSpec, property_node: Node): boolean
|
|
496
496
|
/**
|
|
497
497
|
* Calls the default implementation of the [vfunc`Json`.Serializable.serialize_property]
|
|
498
498
|
* virtual function.
|
|
@@ -518,7 +518,7 @@ export interface Serializable {
|
|
|
518
518
|
* @param pspec a property description
|
|
519
519
|
* @returns a node containing the serialized property
|
|
520
520
|
*/
|
|
521
|
-
default_serialize_property(property_name: string
|
|
521
|
+
default_serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node | null
|
|
522
522
|
/**
|
|
523
523
|
* Asks a `JsonSerializable` implementation to deserialize the
|
|
524
524
|
* property contained inside `property_node` and place its value
|
|
@@ -538,7 +538,7 @@ export interface Serializable {
|
|
|
538
538
|
* @param property_node the JSON node containing the serialized property
|
|
539
539
|
* @returns `TRUE` if the property was successfully deserialized
|
|
540
540
|
*/
|
|
541
|
-
deserialize_property(property_name: string
|
|
541
|
+
deserialize_property(property_name: string, pspec: GObject.ParamSpec, property_node: Node): [ /* returnType */ boolean, /* value */ any ]
|
|
542
542
|
/**
|
|
543
543
|
* Calls the [vfunc`Json`.Serializable.find_property] implementation on
|
|
544
544
|
* the `JsonSerializable` instance, which will return the property
|
|
@@ -546,7 +546,7 @@ export interface Serializable {
|
|
|
546
546
|
* @param name the name of the property
|
|
547
547
|
* @returns the property description
|
|
548
548
|
*/
|
|
549
|
-
find_property(name: string
|
|
549
|
+
find_property(name: string): GObject.ParamSpec | null
|
|
550
550
|
/**
|
|
551
551
|
* Calls the [vfunc`Json`.Serializable.get_property] implementation
|
|
552
552
|
* on the `JsonSerializable` instance, which will get the value of
|
|
@@ -577,7 +577,7 @@ export interface Serializable {
|
|
|
577
577
|
* @param property_name the name of the property to get
|
|
578
578
|
* @param value return location for the property value
|
|
579
579
|
*/
|
|
580
|
-
get_property(property_name: string
|
|
580
|
+
get_property(property_name: string, value: any): void
|
|
581
581
|
/**
|
|
582
582
|
* Calls the [vfunc`Json`.Serializable.list_properties] implementation on
|
|
583
583
|
* the `JsonSerializable` instance, which will return the list of serializable
|
|
@@ -593,7 +593,7 @@ export interface Serializable {
|
|
|
593
593
|
* @param pspec a property description
|
|
594
594
|
* @returns a node containing the serialized property
|
|
595
595
|
*/
|
|
596
|
-
serialize_property(property_name: string
|
|
596
|
+
serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node
|
|
597
597
|
/**
|
|
598
598
|
* Calls the [vfunc`Json`.Serializable.set_property] implementation
|
|
599
599
|
* on the `JsonSerializable` instance, which will set the property
|
|
@@ -610,7 +610,7 @@ export interface Serializable {
|
|
|
610
610
|
* @param property_name the name of the property to set
|
|
611
611
|
* @param value the value
|
|
612
612
|
*/
|
|
613
|
-
set_property(property_name: string
|
|
613
|
+
set_property(property_name: string, value: any): void
|
|
614
614
|
|
|
615
615
|
// Own virtual methods of Json-1.0.Json.Serializable
|
|
616
616
|
|
|
@@ -634,7 +634,7 @@ export interface Serializable {
|
|
|
634
634
|
* @param property_node the JSON node containing the serialized property
|
|
635
635
|
* @returns `TRUE` if the property was successfully deserialized
|
|
636
636
|
*/
|
|
637
|
-
vfunc_deserialize_property(property_name: string
|
|
637
|
+
vfunc_deserialize_property(property_name: string, pspec: GObject.ParamSpec, property_node: Node): [ /* returnType */ boolean, /* value */ any ]
|
|
638
638
|
/**
|
|
639
639
|
* Calls the [vfunc`Json`.Serializable.find_property] implementation on
|
|
640
640
|
* the `JsonSerializable` instance, which will return the property
|
|
@@ -643,7 +643,7 @@ export interface Serializable {
|
|
|
643
643
|
* @param name the name of the property
|
|
644
644
|
* @returns the property description
|
|
645
645
|
*/
|
|
646
|
-
vfunc_find_property(name: string
|
|
646
|
+
vfunc_find_property(name: string): GObject.ParamSpec | null
|
|
647
647
|
/**
|
|
648
648
|
* Calls the [vfunc`Json`.Serializable.get_property] implementation
|
|
649
649
|
* on the `JsonSerializable` instance, which will get the value of
|
|
@@ -665,7 +665,7 @@ export interface Serializable {
|
|
|
665
665
|
* @param pspec a property description
|
|
666
666
|
* @returns a node containing the serialized property
|
|
667
667
|
*/
|
|
668
|
-
vfunc_serialize_property(property_name: string
|
|
668
|
+
vfunc_serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node
|
|
669
669
|
/**
|
|
670
670
|
* Calls the [vfunc`Json`.Serializable.set_property] implementation
|
|
671
671
|
* on the `JsonSerializable` instance, which will set the property
|
|
@@ -801,7 +801,7 @@ export interface Builder {
|
|
|
801
801
|
* @param value the value of the member or element
|
|
802
802
|
* @returns the builder instance
|
|
803
803
|
*/
|
|
804
|
-
add_string_value(value: string
|
|
804
|
+
add_string_value(value: string): Builder | null
|
|
805
805
|
/**
|
|
806
806
|
* Adds a value to the currently open object member or array.
|
|
807
807
|
*
|
|
@@ -879,7 +879,7 @@ export interface Builder {
|
|
|
879
879
|
* @param member_name the name of the member
|
|
880
880
|
* @returns the builder instance
|
|
881
881
|
*/
|
|
882
|
-
set_member_name(member_name: string
|
|
882
|
+
set_member_name(member_name: string): Builder | null
|
|
883
883
|
|
|
884
884
|
// Class property signals of Json-1.0.Json.Builder
|
|
885
885
|
|
|
@@ -1318,7 +1318,7 @@ export interface Parser {
|
|
|
1318
1318
|
* used.
|
|
1319
1319
|
* @returns `TRUE` if there was an assignment, and `FALSE` otherwise
|
|
1320
1320
|
*/
|
|
1321
|
-
has_assignment(): [ /* returnType */ boolean, /* variable_name */ string
|
|
1321
|
+
has_assignment(): [ /* returnType */ boolean, /* variable_name */ string ]
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Loads a JSON stream from a buffer and parses it.
|
|
1324
1324
|
*
|
|
@@ -1328,7 +1328,7 @@ export interface Parser {
|
|
|
1328
1328
|
* @param length the length of the buffer, or -1 if it is `NUL` terminated
|
|
1329
1329
|
* @returns `TRUE` if the buffer was succesfully parsed
|
|
1330
1330
|
*/
|
|
1331
|
-
load_from_data(data: string
|
|
1331
|
+
load_from_data(data: string, length: number): boolean
|
|
1332
1332
|
/**
|
|
1333
1333
|
* Loads a JSON stream from the content of `filename` and parses it.
|
|
1334
1334
|
*
|
|
@@ -1421,7 +1421,7 @@ export interface Parser {
|
|
|
1421
1421
|
vfunc_array_start(): void
|
|
1422
1422
|
vfunc_error(error: GLib.Error): void
|
|
1423
1423
|
vfunc_object_end(object: Object): void
|
|
1424
|
-
vfunc_object_member(object: Object, member_name: string
|
|
1424
|
+
vfunc_object_member(object: Object, member_name: string): void
|
|
1425
1425
|
vfunc_object_start(): void
|
|
1426
1426
|
vfunc_parse_end(): void
|
|
1427
1427
|
vfunc_parse_start(): void
|
|
@@ -1565,7 +1565,7 @@ export interface Path {
|
|
|
1565
1565
|
* @param expression a JSONPath expression
|
|
1566
1566
|
* @returns `TRUE` if the compilation was successful, and `FALSE` otherwise
|
|
1567
1567
|
*/
|
|
1568
|
-
compile(expression: string
|
|
1568
|
+
compile(expression: string): boolean
|
|
1569
1569
|
/**
|
|
1570
1570
|
* Matches the JSON tree pointed by `root` using the expression compiled
|
|
1571
1571
|
* into the `JsonPath`.
|
|
@@ -1754,7 +1754,7 @@ export class Path extends GObject.Object {
|
|
|
1754
1754
|
* @param root the root of a JSON tree
|
|
1755
1755
|
* @returns a newly-created node of type `JSON_NODE_ARRAY` containing the array of matching nodes
|
|
1756
1756
|
*/
|
|
1757
|
-
static query(expression: string
|
|
1757
|
+
static query(expression: string, root: Node): Node
|
|
1758
1758
|
}
|
|
1759
1759
|
|
|
1760
1760
|
export module Reader {
|
|
@@ -1865,7 +1865,7 @@ export interface Reader {
|
|
|
1865
1865
|
* See also: [method`Json`.Reader.get_value]
|
|
1866
1866
|
* @returns the string value
|
|
1867
1867
|
*/
|
|
1868
|
-
get_string_value(): string
|
|
1868
|
+
get_string_value(): string
|
|
1869
1869
|
/**
|
|
1870
1870
|
* Retrieves the value node at the current position of the reader.
|
|
1871
1871
|
*
|
|
@@ -2002,7 +2002,7 @@ export interface Reader {
|
|
|
2002
2002
|
* @param member_name the name of the member to read
|
|
2003
2003
|
* @returns `TRUE` on success, and `FALSE` otherwise
|
|
2004
2004
|
*/
|
|
2005
|
-
read_member(member_name: string
|
|
2005
|
+
read_member(member_name: string): boolean
|
|
2006
2006
|
/**
|
|
2007
2007
|
* Sets the root node of the JSON tree to be read by `reader`.
|
|
2008
2008
|
*
|
|
@@ -2177,7 +2177,7 @@ export interface Array {
|
|
|
2177
2177
|
* See also: [method`Json`.Array.add_element], [method`Json`.Node.set_string]
|
|
2178
2178
|
* @param value the string value to add
|
|
2179
2179
|
*/
|
|
2180
|
-
add_string_element(value: string
|
|
2180
|
+
add_string_element(value: string): void
|
|
2181
2181
|
/**
|
|
2182
2182
|
* Retrieves a copy of the element at the given position in the array.
|
|
2183
2183
|
* @param index_ the index of the element to retrieve
|
|
@@ -2281,7 +2281,7 @@ export interface Array {
|
|
|
2281
2281
|
* @param index_ the index of the element to retrieve
|
|
2282
2282
|
* @returns the string value
|
|
2283
2283
|
*/
|
|
2284
|
-
get_string_element(index_: number): string
|
|
2284
|
+
get_string_element(index_: number): string
|
|
2285
2285
|
/**
|
|
2286
2286
|
* Calculates a hash value for the given `key`.
|
|
2287
2287
|
*
|
|
@@ -2739,7 +2739,7 @@ export interface Node {
|
|
|
2739
2739
|
* a value node.
|
|
2740
2740
|
* @param value a string value
|
|
2741
2741
|
*/
|
|
2742
|
-
set_string(value: string
|
|
2742
|
+
set_string(value: string): void
|
|
2743
2743
|
/**
|
|
2744
2744
|
* Sets a scalar value inside the given node.
|
|
2745
2745
|
*
|
|
@@ -2789,7 +2789,7 @@ export interface Node {
|
|
|
2789
2789
|
* guarantee the name will stay the same across different versions.
|
|
2790
2790
|
* @returns a string containing the name of the type
|
|
2791
2791
|
*/
|
|
2792
|
-
type_name(): string
|
|
2792
|
+
type_name(): string
|
|
2793
2793
|
/**
|
|
2794
2794
|
* Decrements the reference count of `node`.
|
|
2795
2795
|
*
|
|
@@ -2892,13 +2892,13 @@ export interface Object {
|
|
|
2892
2892
|
* @param member_name the name of the member
|
|
2893
2893
|
* @param node the value of the member
|
|
2894
2894
|
*/
|
|
2895
|
-
add_member(member_name: string
|
|
2895
|
+
add_member(member_name: string, node: Node): void
|
|
2896
2896
|
/**
|
|
2897
2897
|
* Retrieves a copy of the value of the given member inside an object.
|
|
2898
2898
|
* @param member_name the name of the JSON object member to access
|
|
2899
2899
|
* @returns a copy of the value for the requested object member
|
|
2900
2900
|
*/
|
|
2901
|
-
dup_member(member_name: string
|
|
2901
|
+
dup_member(member_name: string): Node | null
|
|
2902
2902
|
/**
|
|
2903
2903
|
* Check whether `a` and `b` are equal objects, meaning they have the same
|
|
2904
2904
|
* set of members, and the values of corresponding members are equal.
|
|
@@ -2930,7 +2930,7 @@ export interface Object {
|
|
|
2930
2930
|
* @param member_name the name of the member
|
|
2931
2931
|
* @returns the array inside the object's member
|
|
2932
2932
|
*/
|
|
2933
|
-
get_array_member(member_name: string
|
|
2933
|
+
get_array_member(member_name: string): Array | null
|
|
2934
2934
|
/**
|
|
2935
2935
|
* Convenience function that retrieves the boolean value
|
|
2936
2936
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2941,7 +2941,7 @@ export interface Object {
|
|
|
2941
2941
|
* @param member_name the name of the member
|
|
2942
2942
|
* @returns the boolean value of the object's member
|
|
2943
2943
|
*/
|
|
2944
|
-
get_boolean_member(member_name: string
|
|
2944
|
+
get_boolean_member(member_name: string): boolean
|
|
2945
2945
|
/**
|
|
2946
2946
|
* Convenience function that retrieves the boolean value
|
|
2947
2947
|
* stored in `member_name` of `object`.
|
|
@@ -2952,7 +2952,7 @@ export interface Object {
|
|
|
2952
2952
|
* @param default_value the value to return if `member_name` is not valid
|
|
2953
2953
|
* @returns the boolean value of the object's member, or the given default
|
|
2954
2954
|
*/
|
|
2955
|
-
get_boolean_member_with_default(member_name: string
|
|
2955
|
+
get_boolean_member_with_default(member_name: string, default_value: boolean): boolean
|
|
2956
2956
|
/**
|
|
2957
2957
|
* Convenience function that retrieves the floating point value
|
|
2958
2958
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2963,7 +2963,7 @@ export interface Object {
|
|
|
2963
2963
|
* @param member_name the name of the member
|
|
2964
2964
|
* @returns the floating point value of the object's member
|
|
2965
2965
|
*/
|
|
2966
|
-
get_double_member(member_name: string
|
|
2966
|
+
get_double_member(member_name: string): number
|
|
2967
2967
|
/**
|
|
2968
2968
|
* Convenience function that retrieves the floating point value
|
|
2969
2969
|
* stored in `member_name` of `object`.
|
|
@@ -2974,7 +2974,7 @@ export interface Object {
|
|
|
2974
2974
|
* @param default_value the value to return if `member_name` is not valid
|
|
2975
2975
|
* @returns the floating point value of the object's member, or the given default
|
|
2976
2976
|
*/
|
|
2977
|
-
get_double_member_with_default(member_name: string
|
|
2977
|
+
get_double_member_with_default(member_name: string, default_value: number): number
|
|
2978
2978
|
/**
|
|
2979
2979
|
* Convenience function that retrieves the integer value
|
|
2980
2980
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2985,7 +2985,7 @@ export interface Object {
|
|
|
2985
2985
|
* @param member_name the name of the object member
|
|
2986
2986
|
* @returns the integer value of the object's member
|
|
2987
2987
|
*/
|
|
2988
|
-
get_int_member(member_name: string
|
|
2988
|
+
get_int_member(member_name: string): number
|
|
2989
2989
|
/**
|
|
2990
2990
|
* Convenience function that retrieves the integer value
|
|
2991
2991
|
* stored in `member_name` of `object`.
|
|
@@ -2996,13 +2996,13 @@ export interface Object {
|
|
|
2996
2996
|
* @param default_value the value to return if `member_name` is not valid
|
|
2997
2997
|
* @returns the integer value of the object's member, or the given default
|
|
2998
2998
|
*/
|
|
2999
|
-
get_int_member_with_default(member_name: string
|
|
2999
|
+
get_int_member_with_default(member_name: string, default_value: number): number
|
|
3000
3000
|
/**
|
|
3001
3001
|
* Retrieves the value of the given member inside an object.
|
|
3002
3002
|
* @param member_name the name of the JSON object member to access
|
|
3003
3003
|
* @returns the value for the requested object member
|
|
3004
3004
|
*/
|
|
3005
|
-
get_member(member_name: string
|
|
3005
|
+
get_member(member_name: string): Node | null
|
|
3006
3006
|
/**
|
|
3007
3007
|
* Retrieves all the names of the members of an object.
|
|
3008
3008
|
*
|
|
@@ -3020,7 +3020,7 @@ export interface Object {
|
|
|
3020
3020
|
* @param member_name the name of the member
|
|
3021
3021
|
* @returns `TRUE` if the value is `null`
|
|
3022
3022
|
*/
|
|
3023
|
-
get_null_member(member_name: string
|
|
3023
|
+
get_null_member(member_name: string): boolean
|
|
3024
3024
|
/**
|
|
3025
3025
|
* Convenience function that retrieves the object
|
|
3026
3026
|
* stored in `member_name` of `object`. It is an error to specify a `member_name`
|
|
@@ -3032,7 +3032,7 @@ export interface Object {
|
|
|
3032
3032
|
* @param member_name the name of the member
|
|
3033
3033
|
* @returns the object inside the object's member
|
|
3034
3034
|
*/
|
|
3035
|
-
get_object_member(member_name: string
|
|
3035
|
+
get_object_member(member_name: string): Object | null
|
|
3036
3036
|
/**
|
|
3037
3037
|
* Retrieves the number of members of a JSON object.
|
|
3038
3038
|
* @returns the number of members
|
|
@@ -3048,7 +3048,7 @@ export interface Object {
|
|
|
3048
3048
|
* @param member_name the name of the member
|
|
3049
3049
|
* @returns the string value of the object's member
|
|
3050
3050
|
*/
|
|
3051
|
-
get_string_member(member_name: string
|
|
3051
|
+
get_string_member(member_name: string): string
|
|
3052
3052
|
/**
|
|
3053
3053
|
* Convenience function that retrieves the string value
|
|
3054
3054
|
* stored in `member_name` of `object`.
|
|
@@ -3059,7 +3059,7 @@ export interface Object {
|
|
|
3059
3059
|
* @param default_value the value to return if `member_name` is not valid
|
|
3060
3060
|
* @returns the string value of the object's member, or the given default
|
|
3061
3061
|
*/
|
|
3062
|
-
get_string_member_with_default(member_name: string
|
|
3062
|
+
get_string_member_with_default(member_name: string, default_value: string): string
|
|
3063
3063
|
/**
|
|
3064
3064
|
* Retrieves all the values of the members of an object.
|
|
3065
3065
|
* @returns the member values of the object
|
|
@@ -3070,7 +3070,7 @@ export interface Object {
|
|
|
3070
3070
|
* @param member_name the name of a JSON object member
|
|
3071
3071
|
* @returns `TRUE` if the JSON object has the requested member
|
|
3072
3072
|
*/
|
|
3073
|
-
has_member(member_name: string
|
|
3073
|
+
has_member(member_name: string): boolean
|
|
3074
3074
|
/**
|
|
3075
3075
|
* Calculate a hash value for the given `key` (a JSON object).
|
|
3076
3076
|
*
|
|
@@ -3095,7 +3095,7 @@ export interface Object {
|
|
|
3095
3095
|
* Removes `member_name` from `object,` freeing its allocated resources.
|
|
3096
3096
|
* @param member_name the name of the member to remove
|
|
3097
3097
|
*/
|
|
3098
|
-
remove_member(member_name: string
|
|
3098
|
+
remove_member(member_name: string): void
|
|
3099
3099
|
/**
|
|
3100
3100
|
* Seals the object, making it immutable to further changes.
|
|
3101
3101
|
*
|
|
@@ -3111,7 +3111,7 @@ export interface Object {
|
|
|
3111
3111
|
* @param member_name the name of the member
|
|
3112
3112
|
* @param value the value of the member
|
|
3113
3113
|
*/
|
|
3114
|
-
set_array_member(member_name: string
|
|
3114
|
+
set_array_member(member_name: string, value: Array): void
|
|
3115
3115
|
/**
|
|
3116
3116
|
* Convenience function for setting an object member with a boolean value.
|
|
3117
3117
|
*
|
|
@@ -3119,7 +3119,7 @@ export interface Object {
|
|
|
3119
3119
|
* @param member_name the name of the member
|
|
3120
3120
|
* @param value the value of the member
|
|
3121
3121
|
*/
|
|
3122
|
-
set_boolean_member(member_name: string
|
|
3122
|
+
set_boolean_member(member_name: string, value: boolean): void
|
|
3123
3123
|
/**
|
|
3124
3124
|
* Convenience function for setting an object member with a floating point value.
|
|
3125
3125
|
*
|
|
@@ -3127,7 +3127,7 @@ export interface Object {
|
|
|
3127
3127
|
* @param member_name the name of the member
|
|
3128
3128
|
* @param value the value of the member
|
|
3129
3129
|
*/
|
|
3130
|
-
set_double_member(member_name: string
|
|
3130
|
+
set_double_member(member_name: string, value: number): void
|
|
3131
3131
|
/**
|
|
3132
3132
|
* Convenience function for setting an object member with an integer value.
|
|
3133
3133
|
*
|
|
@@ -3135,7 +3135,7 @@ export interface Object {
|
|
|
3135
3135
|
* @param member_name the name of the member
|
|
3136
3136
|
* @param value the value of the member
|
|
3137
3137
|
*/
|
|
3138
|
-
set_int_member(member_name: string
|
|
3138
|
+
set_int_member(member_name: string, value: number): void
|
|
3139
3139
|
/**
|
|
3140
3140
|
* Sets the value of a member inside an object.
|
|
3141
3141
|
*
|
|
@@ -3147,14 +3147,14 @@ export interface Object {
|
|
|
3147
3147
|
* @param member_name the name of the member
|
|
3148
3148
|
* @param node the value of the member
|
|
3149
3149
|
*/
|
|
3150
|
-
set_member(member_name: string
|
|
3150
|
+
set_member(member_name: string, node: Node): void
|
|
3151
3151
|
/**
|
|
3152
3152
|
* Convenience function for setting an object member with a `null` value.
|
|
3153
3153
|
*
|
|
3154
3154
|
* See also: [method`Json`.Object.set_member], [method`Json`.Node.init_null]
|
|
3155
3155
|
* @param member_name the name of the member
|
|
3156
3156
|
*/
|
|
3157
|
-
set_null_member(member_name: string
|
|
3157
|
+
set_null_member(member_name: string): void
|
|
3158
3158
|
/**
|
|
3159
3159
|
* Convenience function for setting an object member with an object value.
|
|
3160
3160
|
*
|
|
@@ -3162,7 +3162,7 @@ export interface Object {
|
|
|
3162
3162
|
* @param member_name the name of the member
|
|
3163
3163
|
* @param value the value of the member
|
|
3164
3164
|
*/
|
|
3165
|
-
set_object_member(member_name: string
|
|
3165
|
+
set_object_member(member_name: string, value: Object): void
|
|
3166
3166
|
/**
|
|
3167
3167
|
* Convenience function for setting an object member with a string value.
|
|
3168
3168
|
*
|
|
@@ -3170,7 +3170,7 @@ export interface Object {
|
|
|
3170
3170
|
* @param member_name the name of the member
|
|
3171
3171
|
* @param value the value of the member
|
|
3172
3172
|
*/
|
|
3173
|
-
set_string_member(member_name: string
|
|
3173
|
+
set_string_member(member_name: string, value: string): void
|
|
3174
3174
|
/**
|
|
3175
3175
|
* Releases a reference on the given object.
|
|
3176
3176
|
*
|
|
@@ -3286,7 +3286,7 @@ export interface ObjectIter {
|
|
|
3286
3286
|
* See also: [method`Json`.ObjectIter.next_ordered]
|
|
3287
3287
|
* @returns `TRUE` if @member_name and @member_node are valid; `FALSE` if there are no more members
|
|
3288
3288
|
*/
|
|
3289
|
-
next(): [ /* returnType */ boolean, /* member_name */ string
|
|
3289
|
+
next(): [ /* returnType */ boolean, /* member_name */ string, /* member_node */ Node ]
|
|
3290
3290
|
/**
|
|
3291
3291
|
* Advances the iterator and retrieves the next member in the object.
|
|
3292
3292
|
*
|
|
@@ -3304,7 +3304,7 @@ export interface ObjectIter {
|
|
|
3304
3304
|
* See also: [method`Json`.ObjectIter.next]
|
|
3305
3305
|
* @returns `TRUE `if @member_name and @member_node are valid; `FALSE` if the end of the object has been reached
|
|
3306
3306
|
*/
|
|
3307
|
-
next_ordered(): [ /* returnType */ boolean, /* member_name */ string
|
|
3307
|
+
next_ordered(): [ /* returnType */ boolean, /* member_name */ string, /* member_node */ Node ]
|
|
3308
3308
|
}
|
|
3309
3309
|
|
|
3310
3310
|
/**
|
|
@@ -3333,7 +3333,7 @@ export interface ParserClass {
|
|
|
3333
3333
|
|
|
3334
3334
|
parse_start: (parser: Parser) => void
|
|
3335
3335
|
object_start: (parser: Parser) => void
|
|
3336
|
-
object_member: (parser: Parser, object: Object, member_name: string
|
|
3336
|
+
object_member: (parser: Parser, object: Object, member_name: string) => void
|
|
3337
3337
|
object_end: (parser: Parser, object: Object) => void
|
|
3338
3338
|
array_start: (parser: Parser) => void
|
|
3339
3339
|
array_element: (parser: Parser, array: Array, index_: number) => void
|
|
@@ -3397,9 +3397,9 @@ export interface SerializableIface {
|
|
|
3397
3397
|
|
|
3398
3398
|
// Own fields of Json-1.0.Json.SerializableIface
|
|
3399
3399
|
|
|
3400
|
-
serialize_property: (serializable: Serializable, property_name: string
|
|
3401
|
-
deserialize_property: (serializable: Serializable, property_name: string
|
|
3402
|
-
find_property: (serializable: Serializable, name: string
|
|
3400
|
+
serialize_property: (serializable: Serializable, property_name: string, value: any, pspec: GObject.ParamSpec) => Node
|
|
3401
|
+
deserialize_property: (serializable: Serializable, property_name: string, pspec: GObject.ParamSpec, property_node: Node) => [ /* returnType */ boolean, /* value */ any ]
|
|
3402
|
+
find_property: (serializable: Serializable, name: string) => GObject.ParamSpec | null
|
|
3403
3403
|
set_property: (serializable: Serializable, pspec: GObject.ParamSpec, value: any) => void
|
|
3404
3404
|
get_property: (serializable: Serializable, pspec: GObject.ParamSpec) => /* value */ any
|
|
3405
3405
|
}
|
package/json-1.0.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ const MINOR_VERSION: number
|
|
|
142
142
|
* The version of JSON-GLib, encoded as a string, useful for printing and
|
|
143
143
|
* concatenation.
|
|
144
144
|
*/
|
|
145
|
-
const VERSION_S: string
|
|
145
|
+
const VERSION_S: string
|
|
146
146
|
/**
|
|
147
147
|
* Checks whether it is possible to deserialize a `GBoxed` of
|
|
148
148
|
* type `gboxed_type` from a [struct`Json`.Node] of type `node_type`.
|
|
@@ -195,7 +195,7 @@ function boxed_serialize(gboxed_type: GObject.GType, boxed: any | null): Node |
|
|
|
195
195
|
* @param length length of the data stream (unused)
|
|
196
196
|
* @returns a new object instance of the given type
|
|
197
197
|
*/
|
|
198
|
-
function construct_gobject(gtype: GObject.GType, data: string
|
|
198
|
+
function construct_gobject(gtype: GObject.GType, data: string, length: number): GObject.Object | null
|
|
199
199
|
/**
|
|
200
200
|
* Parses the given string and returns the corresponding JSON tree.
|
|
201
201
|
*
|
|
@@ -206,7 +206,7 @@ function construct_gobject(gtype: GObject.GType, data: string | null, length: nu
|
|
|
206
206
|
* @param str a valid UTF-8 string containing JSON data
|
|
207
207
|
* @returns the root node of the JSON tree
|
|
208
208
|
*/
|
|
209
|
-
function from_string(str: string
|
|
209
|
+
function from_string(str: string): Node | null
|
|
210
210
|
/**
|
|
211
211
|
* Creates a new `GObject` instance of the given type, and constructs it
|
|
212
212
|
* using the members of the object in the given node.
|
|
@@ -230,7 +230,7 @@ function gobject_deserialize(gtype: GObject.GType, node: Node): GObject.Object
|
|
|
230
230
|
* @param length length of the data stream, or -1 if it is `NUL`-terminated
|
|
231
231
|
* @returns a new object instance of the given type
|
|
232
232
|
*/
|
|
233
|
-
function gobject_from_data(gtype: GObject.GType, data: string
|
|
233
|
+
function gobject_from_data(gtype: GObject.GType, data: string, length: number): GObject.Object | null
|
|
234
234
|
/**
|
|
235
235
|
* Creates a JSON tree representing the passed object instance.
|
|
236
236
|
*
|
|
@@ -298,7 +298,7 @@ function gvariant_deserialize(json_node: Node, signature: string | null): GLib.V
|
|
|
298
298
|
* @param signature A valid `GVariant` type string
|
|
299
299
|
* @returns A newly created `GVariant`D compliant
|
|
300
300
|
*/
|
|
301
|
-
function gvariant_deserialize_data(json: string
|
|
301
|
+
function gvariant_deserialize_data(json: string, length: number, signature: string | null): GLib.Variant | null
|
|
302
302
|
/**
|
|
303
303
|
* Converts `variant` to a JSON tree.
|
|
304
304
|
* @param variant A `GVariant` to convert
|
|
@@ -455,7 +455,7 @@ interface BoxedSerializeFunc {
|
|
|
455
455
|
* @param member_node the value of the member
|
|
456
456
|
*/
|
|
457
457
|
interface ObjectForeach {
|
|
458
|
-
(object: Object, member_name: string
|
|
458
|
+
(object: Object, member_name: string, member_node: Node): void
|
|
459
459
|
}
|
|
460
460
|
module Serializable {
|
|
461
461
|
|
|
@@ -494,7 +494,7 @@ interface Serializable {
|
|
|
494
494
|
* @param property_node the JSON node containing the serialized property
|
|
495
495
|
* @returns `TRUE` if the property was successfully deserialized
|
|
496
496
|
*/
|
|
497
|
-
default_deserialize_property(property_name: string
|
|
497
|
+
default_deserialize_property(property_name: string, value: any, pspec: GObject.ParamSpec, property_node: Node): boolean
|
|
498
498
|
/**
|
|
499
499
|
* Calls the default implementation of the [vfunc`Json`.Serializable.serialize_property]
|
|
500
500
|
* virtual function.
|
|
@@ -520,7 +520,7 @@ interface Serializable {
|
|
|
520
520
|
* @param pspec a property description
|
|
521
521
|
* @returns a node containing the serialized property
|
|
522
522
|
*/
|
|
523
|
-
default_serialize_property(property_name: string
|
|
523
|
+
default_serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node | null
|
|
524
524
|
/**
|
|
525
525
|
* Asks a `JsonSerializable` implementation to deserialize the
|
|
526
526
|
* property contained inside `property_node` and place its value
|
|
@@ -540,7 +540,7 @@ interface Serializable {
|
|
|
540
540
|
* @param property_node the JSON node containing the serialized property
|
|
541
541
|
* @returns `TRUE` if the property was successfully deserialized
|
|
542
542
|
*/
|
|
543
|
-
deserialize_property(property_name: string
|
|
543
|
+
deserialize_property(property_name: string, pspec: GObject.ParamSpec, property_node: Node): [ /* returnType */ boolean, /* value */ any ]
|
|
544
544
|
/**
|
|
545
545
|
* Calls the [vfunc`Json`.Serializable.find_property] implementation on
|
|
546
546
|
* the `JsonSerializable` instance, which will return the property
|
|
@@ -548,7 +548,7 @@ interface Serializable {
|
|
|
548
548
|
* @param name the name of the property
|
|
549
549
|
* @returns the property description
|
|
550
550
|
*/
|
|
551
|
-
find_property(name: string
|
|
551
|
+
find_property(name: string): GObject.ParamSpec | null
|
|
552
552
|
/**
|
|
553
553
|
* Calls the [vfunc`Json`.Serializable.get_property] implementation
|
|
554
554
|
* on the `JsonSerializable` instance, which will get the value of
|
|
@@ -579,7 +579,7 @@ interface Serializable {
|
|
|
579
579
|
* @param property_name the name of the property to get
|
|
580
580
|
* @param value return location for the property value
|
|
581
581
|
*/
|
|
582
|
-
get_property(property_name: string
|
|
582
|
+
get_property(property_name: string, value: any): void
|
|
583
583
|
/**
|
|
584
584
|
* Calls the [vfunc`Json`.Serializable.list_properties] implementation on
|
|
585
585
|
* the `JsonSerializable` instance, which will return the list of serializable
|
|
@@ -595,7 +595,7 @@ interface Serializable {
|
|
|
595
595
|
* @param pspec a property description
|
|
596
596
|
* @returns a node containing the serialized property
|
|
597
597
|
*/
|
|
598
|
-
serialize_property(property_name: string
|
|
598
|
+
serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node
|
|
599
599
|
/**
|
|
600
600
|
* Calls the [vfunc`Json`.Serializable.set_property] implementation
|
|
601
601
|
* on the `JsonSerializable` instance, which will set the property
|
|
@@ -612,7 +612,7 @@ interface Serializable {
|
|
|
612
612
|
* @param property_name the name of the property to set
|
|
613
613
|
* @param value the value
|
|
614
614
|
*/
|
|
615
|
-
set_property(property_name: string
|
|
615
|
+
set_property(property_name: string, value: any): void
|
|
616
616
|
|
|
617
617
|
// Own virtual methods of Json-1.0.Json.Serializable
|
|
618
618
|
|
|
@@ -636,7 +636,7 @@ interface Serializable {
|
|
|
636
636
|
* @param property_node the JSON node containing the serialized property
|
|
637
637
|
* @returns `TRUE` if the property was successfully deserialized
|
|
638
638
|
*/
|
|
639
|
-
vfunc_deserialize_property(property_name: string
|
|
639
|
+
vfunc_deserialize_property(property_name: string, pspec: GObject.ParamSpec, property_node: Node): [ /* returnType */ boolean, /* value */ any ]
|
|
640
640
|
/**
|
|
641
641
|
* Calls the [vfunc`Json`.Serializable.find_property] implementation on
|
|
642
642
|
* the `JsonSerializable` instance, which will return the property
|
|
@@ -645,7 +645,7 @@ interface Serializable {
|
|
|
645
645
|
* @param name the name of the property
|
|
646
646
|
* @returns the property description
|
|
647
647
|
*/
|
|
648
|
-
vfunc_find_property(name: string
|
|
648
|
+
vfunc_find_property(name: string): GObject.ParamSpec | null
|
|
649
649
|
/**
|
|
650
650
|
* Calls the [vfunc`Json`.Serializable.get_property] implementation
|
|
651
651
|
* on the `JsonSerializable` instance, which will get the value of
|
|
@@ -667,7 +667,7 @@ interface Serializable {
|
|
|
667
667
|
* @param pspec a property description
|
|
668
668
|
* @returns a node containing the serialized property
|
|
669
669
|
*/
|
|
670
|
-
vfunc_serialize_property(property_name: string
|
|
670
|
+
vfunc_serialize_property(property_name: string, value: any, pspec: GObject.ParamSpec): Node
|
|
671
671
|
/**
|
|
672
672
|
* Calls the [vfunc`Json`.Serializable.set_property] implementation
|
|
673
673
|
* on the `JsonSerializable` instance, which will set the property
|
|
@@ -803,7 +803,7 @@ interface Builder {
|
|
|
803
803
|
* @param value the value of the member or element
|
|
804
804
|
* @returns the builder instance
|
|
805
805
|
*/
|
|
806
|
-
add_string_value(value: string
|
|
806
|
+
add_string_value(value: string): Builder | null
|
|
807
807
|
/**
|
|
808
808
|
* Adds a value to the currently open object member or array.
|
|
809
809
|
*
|
|
@@ -881,7 +881,7 @@ interface Builder {
|
|
|
881
881
|
* @param member_name the name of the member
|
|
882
882
|
* @returns the builder instance
|
|
883
883
|
*/
|
|
884
|
-
set_member_name(member_name: string
|
|
884
|
+
set_member_name(member_name: string): Builder | null
|
|
885
885
|
|
|
886
886
|
// Class property signals of Json-1.0.Json.Builder
|
|
887
887
|
|
|
@@ -1320,7 +1320,7 @@ interface Parser {
|
|
|
1320
1320
|
* used.
|
|
1321
1321
|
* @returns `TRUE` if there was an assignment, and `FALSE` otherwise
|
|
1322
1322
|
*/
|
|
1323
|
-
has_assignment(): [ /* returnType */ boolean, /* variable_name */ string
|
|
1323
|
+
has_assignment(): [ /* returnType */ boolean, /* variable_name */ string ]
|
|
1324
1324
|
/**
|
|
1325
1325
|
* Loads a JSON stream from a buffer and parses it.
|
|
1326
1326
|
*
|
|
@@ -1330,7 +1330,7 @@ interface Parser {
|
|
|
1330
1330
|
* @param length the length of the buffer, or -1 if it is `NUL` terminated
|
|
1331
1331
|
* @returns `TRUE` if the buffer was succesfully parsed
|
|
1332
1332
|
*/
|
|
1333
|
-
load_from_data(data: string
|
|
1333
|
+
load_from_data(data: string, length: number): boolean
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Loads a JSON stream from the content of `filename` and parses it.
|
|
1336
1336
|
*
|
|
@@ -1423,7 +1423,7 @@ interface Parser {
|
|
|
1423
1423
|
vfunc_array_start(): void
|
|
1424
1424
|
vfunc_error(error: GLib.Error): void
|
|
1425
1425
|
vfunc_object_end(object: Object): void
|
|
1426
|
-
vfunc_object_member(object: Object, member_name: string
|
|
1426
|
+
vfunc_object_member(object: Object, member_name: string): void
|
|
1427
1427
|
vfunc_object_start(): void
|
|
1428
1428
|
vfunc_parse_end(): void
|
|
1429
1429
|
vfunc_parse_start(): void
|
|
@@ -1567,7 +1567,7 @@ interface Path {
|
|
|
1567
1567
|
* @param expression a JSONPath expression
|
|
1568
1568
|
* @returns `TRUE` if the compilation was successful, and `FALSE` otherwise
|
|
1569
1569
|
*/
|
|
1570
|
-
compile(expression: string
|
|
1570
|
+
compile(expression: string): boolean
|
|
1571
1571
|
/**
|
|
1572
1572
|
* Matches the JSON tree pointed by `root` using the expression compiled
|
|
1573
1573
|
* into the `JsonPath`.
|
|
@@ -1756,7 +1756,7 @@ class Path extends GObject.Object {
|
|
|
1756
1756
|
* @param root the root of a JSON tree
|
|
1757
1757
|
* @returns a newly-created node of type `JSON_NODE_ARRAY` containing the array of matching nodes
|
|
1758
1758
|
*/
|
|
1759
|
-
static query(expression: string
|
|
1759
|
+
static query(expression: string, root: Node): Node
|
|
1760
1760
|
}
|
|
1761
1761
|
|
|
1762
1762
|
module Reader {
|
|
@@ -1867,7 +1867,7 @@ interface Reader {
|
|
|
1867
1867
|
* See also: [method`Json`.Reader.get_value]
|
|
1868
1868
|
* @returns the string value
|
|
1869
1869
|
*/
|
|
1870
|
-
get_string_value(): string
|
|
1870
|
+
get_string_value(): string
|
|
1871
1871
|
/**
|
|
1872
1872
|
* Retrieves the value node at the current position of the reader.
|
|
1873
1873
|
*
|
|
@@ -2004,7 +2004,7 @@ interface Reader {
|
|
|
2004
2004
|
* @param member_name the name of the member to read
|
|
2005
2005
|
* @returns `TRUE` on success, and `FALSE` otherwise
|
|
2006
2006
|
*/
|
|
2007
|
-
read_member(member_name: string
|
|
2007
|
+
read_member(member_name: string): boolean
|
|
2008
2008
|
/**
|
|
2009
2009
|
* Sets the root node of the JSON tree to be read by `reader`.
|
|
2010
2010
|
*
|
|
@@ -2179,7 +2179,7 @@ interface Array {
|
|
|
2179
2179
|
* See also: [method`Json`.Array.add_element], [method`Json`.Node.set_string]
|
|
2180
2180
|
* @param value the string value to add
|
|
2181
2181
|
*/
|
|
2182
|
-
add_string_element(value: string
|
|
2182
|
+
add_string_element(value: string): void
|
|
2183
2183
|
/**
|
|
2184
2184
|
* Retrieves a copy of the element at the given position in the array.
|
|
2185
2185
|
* @param index_ the index of the element to retrieve
|
|
@@ -2283,7 +2283,7 @@ interface Array {
|
|
|
2283
2283
|
* @param index_ the index of the element to retrieve
|
|
2284
2284
|
* @returns the string value
|
|
2285
2285
|
*/
|
|
2286
|
-
get_string_element(index_: number): string
|
|
2286
|
+
get_string_element(index_: number): string
|
|
2287
2287
|
/**
|
|
2288
2288
|
* Calculates a hash value for the given `key`.
|
|
2289
2289
|
*
|
|
@@ -2741,7 +2741,7 @@ interface Node {
|
|
|
2741
2741
|
* a value node.
|
|
2742
2742
|
* @param value a string value
|
|
2743
2743
|
*/
|
|
2744
|
-
set_string(value: string
|
|
2744
|
+
set_string(value: string): void
|
|
2745
2745
|
/**
|
|
2746
2746
|
* Sets a scalar value inside the given node.
|
|
2747
2747
|
*
|
|
@@ -2791,7 +2791,7 @@ interface Node {
|
|
|
2791
2791
|
* guarantee the name will stay the same across different versions.
|
|
2792
2792
|
* @returns a string containing the name of the type
|
|
2793
2793
|
*/
|
|
2794
|
-
type_name(): string
|
|
2794
|
+
type_name(): string
|
|
2795
2795
|
/**
|
|
2796
2796
|
* Decrements the reference count of `node`.
|
|
2797
2797
|
*
|
|
@@ -2894,13 +2894,13 @@ interface Object {
|
|
|
2894
2894
|
* @param member_name the name of the member
|
|
2895
2895
|
* @param node the value of the member
|
|
2896
2896
|
*/
|
|
2897
|
-
add_member(member_name: string
|
|
2897
|
+
add_member(member_name: string, node: Node): void
|
|
2898
2898
|
/**
|
|
2899
2899
|
* Retrieves a copy of the value of the given member inside an object.
|
|
2900
2900
|
* @param member_name the name of the JSON object member to access
|
|
2901
2901
|
* @returns a copy of the value for the requested object member
|
|
2902
2902
|
*/
|
|
2903
|
-
dup_member(member_name: string
|
|
2903
|
+
dup_member(member_name: string): Node | null
|
|
2904
2904
|
/**
|
|
2905
2905
|
* Check whether `a` and `b` are equal objects, meaning they have the same
|
|
2906
2906
|
* set of members, and the values of corresponding members are equal.
|
|
@@ -2932,7 +2932,7 @@ interface Object {
|
|
|
2932
2932
|
* @param member_name the name of the member
|
|
2933
2933
|
* @returns the array inside the object's member
|
|
2934
2934
|
*/
|
|
2935
|
-
get_array_member(member_name: string
|
|
2935
|
+
get_array_member(member_name: string): Array | null
|
|
2936
2936
|
/**
|
|
2937
2937
|
* Convenience function that retrieves the boolean value
|
|
2938
2938
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2943,7 +2943,7 @@ interface Object {
|
|
|
2943
2943
|
* @param member_name the name of the member
|
|
2944
2944
|
* @returns the boolean value of the object's member
|
|
2945
2945
|
*/
|
|
2946
|
-
get_boolean_member(member_name: string
|
|
2946
|
+
get_boolean_member(member_name: string): boolean
|
|
2947
2947
|
/**
|
|
2948
2948
|
* Convenience function that retrieves the boolean value
|
|
2949
2949
|
* stored in `member_name` of `object`.
|
|
@@ -2954,7 +2954,7 @@ interface Object {
|
|
|
2954
2954
|
* @param default_value the value to return if `member_name` is not valid
|
|
2955
2955
|
* @returns the boolean value of the object's member, or the given default
|
|
2956
2956
|
*/
|
|
2957
|
-
get_boolean_member_with_default(member_name: string
|
|
2957
|
+
get_boolean_member_with_default(member_name: string, default_value: boolean): boolean
|
|
2958
2958
|
/**
|
|
2959
2959
|
* Convenience function that retrieves the floating point value
|
|
2960
2960
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2965,7 +2965,7 @@ interface Object {
|
|
|
2965
2965
|
* @param member_name the name of the member
|
|
2966
2966
|
* @returns the floating point value of the object's member
|
|
2967
2967
|
*/
|
|
2968
|
-
get_double_member(member_name: string
|
|
2968
|
+
get_double_member(member_name: string): number
|
|
2969
2969
|
/**
|
|
2970
2970
|
* Convenience function that retrieves the floating point value
|
|
2971
2971
|
* stored in `member_name` of `object`.
|
|
@@ -2976,7 +2976,7 @@ interface Object {
|
|
|
2976
2976
|
* @param default_value the value to return if `member_name` is not valid
|
|
2977
2977
|
* @returns the floating point value of the object's member, or the given default
|
|
2978
2978
|
*/
|
|
2979
|
-
get_double_member_with_default(member_name: string
|
|
2979
|
+
get_double_member_with_default(member_name: string, default_value: number): number
|
|
2980
2980
|
/**
|
|
2981
2981
|
* Convenience function that retrieves the integer value
|
|
2982
2982
|
* stored in `member_name` of `object`. It is an error to specify a
|
|
@@ -2987,7 +2987,7 @@ interface Object {
|
|
|
2987
2987
|
* @param member_name the name of the object member
|
|
2988
2988
|
* @returns the integer value of the object's member
|
|
2989
2989
|
*/
|
|
2990
|
-
get_int_member(member_name: string
|
|
2990
|
+
get_int_member(member_name: string): number
|
|
2991
2991
|
/**
|
|
2992
2992
|
* Convenience function that retrieves the integer value
|
|
2993
2993
|
* stored in `member_name` of `object`.
|
|
@@ -2998,13 +2998,13 @@ interface Object {
|
|
|
2998
2998
|
* @param default_value the value to return if `member_name` is not valid
|
|
2999
2999
|
* @returns the integer value of the object's member, or the given default
|
|
3000
3000
|
*/
|
|
3001
|
-
get_int_member_with_default(member_name: string
|
|
3001
|
+
get_int_member_with_default(member_name: string, default_value: number): number
|
|
3002
3002
|
/**
|
|
3003
3003
|
* Retrieves the value of the given member inside an object.
|
|
3004
3004
|
* @param member_name the name of the JSON object member to access
|
|
3005
3005
|
* @returns the value for the requested object member
|
|
3006
3006
|
*/
|
|
3007
|
-
get_member(member_name: string
|
|
3007
|
+
get_member(member_name: string): Node | null
|
|
3008
3008
|
/**
|
|
3009
3009
|
* Retrieves all the names of the members of an object.
|
|
3010
3010
|
*
|
|
@@ -3022,7 +3022,7 @@ interface Object {
|
|
|
3022
3022
|
* @param member_name the name of the member
|
|
3023
3023
|
* @returns `TRUE` if the value is `null`
|
|
3024
3024
|
*/
|
|
3025
|
-
get_null_member(member_name: string
|
|
3025
|
+
get_null_member(member_name: string): boolean
|
|
3026
3026
|
/**
|
|
3027
3027
|
* Convenience function that retrieves the object
|
|
3028
3028
|
* stored in `member_name` of `object`. It is an error to specify a `member_name`
|
|
@@ -3034,7 +3034,7 @@ interface Object {
|
|
|
3034
3034
|
* @param member_name the name of the member
|
|
3035
3035
|
* @returns the object inside the object's member
|
|
3036
3036
|
*/
|
|
3037
|
-
get_object_member(member_name: string
|
|
3037
|
+
get_object_member(member_name: string): Object | null
|
|
3038
3038
|
/**
|
|
3039
3039
|
* Retrieves the number of members of a JSON object.
|
|
3040
3040
|
* @returns the number of members
|
|
@@ -3050,7 +3050,7 @@ interface Object {
|
|
|
3050
3050
|
* @param member_name the name of the member
|
|
3051
3051
|
* @returns the string value of the object's member
|
|
3052
3052
|
*/
|
|
3053
|
-
get_string_member(member_name: string
|
|
3053
|
+
get_string_member(member_name: string): string
|
|
3054
3054
|
/**
|
|
3055
3055
|
* Convenience function that retrieves the string value
|
|
3056
3056
|
* stored in `member_name` of `object`.
|
|
@@ -3061,7 +3061,7 @@ interface Object {
|
|
|
3061
3061
|
* @param default_value the value to return if `member_name` is not valid
|
|
3062
3062
|
* @returns the string value of the object's member, or the given default
|
|
3063
3063
|
*/
|
|
3064
|
-
get_string_member_with_default(member_name: string
|
|
3064
|
+
get_string_member_with_default(member_name: string, default_value: string): string
|
|
3065
3065
|
/**
|
|
3066
3066
|
* Retrieves all the values of the members of an object.
|
|
3067
3067
|
* @returns the member values of the object
|
|
@@ -3072,7 +3072,7 @@ interface Object {
|
|
|
3072
3072
|
* @param member_name the name of a JSON object member
|
|
3073
3073
|
* @returns `TRUE` if the JSON object has the requested member
|
|
3074
3074
|
*/
|
|
3075
|
-
has_member(member_name: string
|
|
3075
|
+
has_member(member_name: string): boolean
|
|
3076
3076
|
/**
|
|
3077
3077
|
* Calculate a hash value for the given `key` (a JSON object).
|
|
3078
3078
|
*
|
|
@@ -3097,7 +3097,7 @@ interface Object {
|
|
|
3097
3097
|
* Removes `member_name` from `object,` freeing its allocated resources.
|
|
3098
3098
|
* @param member_name the name of the member to remove
|
|
3099
3099
|
*/
|
|
3100
|
-
remove_member(member_name: string
|
|
3100
|
+
remove_member(member_name: string): void
|
|
3101
3101
|
/**
|
|
3102
3102
|
* Seals the object, making it immutable to further changes.
|
|
3103
3103
|
*
|
|
@@ -3113,7 +3113,7 @@ interface Object {
|
|
|
3113
3113
|
* @param member_name the name of the member
|
|
3114
3114
|
* @param value the value of the member
|
|
3115
3115
|
*/
|
|
3116
|
-
set_array_member(member_name: string
|
|
3116
|
+
set_array_member(member_name: string, value: Array): void
|
|
3117
3117
|
/**
|
|
3118
3118
|
* Convenience function for setting an object member with a boolean value.
|
|
3119
3119
|
*
|
|
@@ -3121,7 +3121,7 @@ interface Object {
|
|
|
3121
3121
|
* @param member_name the name of the member
|
|
3122
3122
|
* @param value the value of the member
|
|
3123
3123
|
*/
|
|
3124
|
-
set_boolean_member(member_name: string
|
|
3124
|
+
set_boolean_member(member_name: string, value: boolean): void
|
|
3125
3125
|
/**
|
|
3126
3126
|
* Convenience function for setting an object member with a floating point value.
|
|
3127
3127
|
*
|
|
@@ -3129,7 +3129,7 @@ interface Object {
|
|
|
3129
3129
|
* @param member_name the name of the member
|
|
3130
3130
|
* @param value the value of the member
|
|
3131
3131
|
*/
|
|
3132
|
-
set_double_member(member_name: string
|
|
3132
|
+
set_double_member(member_name: string, value: number): void
|
|
3133
3133
|
/**
|
|
3134
3134
|
* Convenience function for setting an object member with an integer value.
|
|
3135
3135
|
*
|
|
@@ -3137,7 +3137,7 @@ interface Object {
|
|
|
3137
3137
|
* @param member_name the name of the member
|
|
3138
3138
|
* @param value the value of the member
|
|
3139
3139
|
*/
|
|
3140
|
-
set_int_member(member_name: string
|
|
3140
|
+
set_int_member(member_name: string, value: number): void
|
|
3141
3141
|
/**
|
|
3142
3142
|
* Sets the value of a member inside an object.
|
|
3143
3143
|
*
|
|
@@ -3149,14 +3149,14 @@ interface Object {
|
|
|
3149
3149
|
* @param member_name the name of the member
|
|
3150
3150
|
* @param node the value of the member
|
|
3151
3151
|
*/
|
|
3152
|
-
set_member(member_name: string
|
|
3152
|
+
set_member(member_name: string, node: Node): void
|
|
3153
3153
|
/**
|
|
3154
3154
|
* Convenience function for setting an object member with a `null` value.
|
|
3155
3155
|
*
|
|
3156
3156
|
* See also: [method`Json`.Object.set_member], [method`Json`.Node.init_null]
|
|
3157
3157
|
* @param member_name the name of the member
|
|
3158
3158
|
*/
|
|
3159
|
-
set_null_member(member_name: string
|
|
3159
|
+
set_null_member(member_name: string): void
|
|
3160
3160
|
/**
|
|
3161
3161
|
* Convenience function for setting an object member with an object value.
|
|
3162
3162
|
*
|
|
@@ -3164,7 +3164,7 @@ interface Object {
|
|
|
3164
3164
|
* @param member_name the name of the member
|
|
3165
3165
|
* @param value the value of the member
|
|
3166
3166
|
*/
|
|
3167
|
-
set_object_member(member_name: string
|
|
3167
|
+
set_object_member(member_name: string, value: Object): void
|
|
3168
3168
|
/**
|
|
3169
3169
|
* Convenience function for setting an object member with a string value.
|
|
3170
3170
|
*
|
|
@@ -3172,7 +3172,7 @@ interface Object {
|
|
|
3172
3172
|
* @param member_name the name of the member
|
|
3173
3173
|
* @param value the value of the member
|
|
3174
3174
|
*/
|
|
3175
|
-
set_string_member(member_name: string
|
|
3175
|
+
set_string_member(member_name: string, value: string): void
|
|
3176
3176
|
/**
|
|
3177
3177
|
* Releases a reference on the given object.
|
|
3178
3178
|
*
|
|
@@ -3288,7 +3288,7 @@ interface ObjectIter {
|
|
|
3288
3288
|
* See also: [method`Json`.ObjectIter.next_ordered]
|
|
3289
3289
|
* @returns `TRUE` if @member_name and @member_node are valid; `FALSE` if there are no more members
|
|
3290
3290
|
*/
|
|
3291
|
-
next(): [ /* returnType */ boolean, /* member_name */ string
|
|
3291
|
+
next(): [ /* returnType */ boolean, /* member_name */ string, /* member_node */ Node ]
|
|
3292
3292
|
/**
|
|
3293
3293
|
* Advances the iterator and retrieves the next member in the object.
|
|
3294
3294
|
*
|
|
@@ -3306,7 +3306,7 @@ interface ObjectIter {
|
|
|
3306
3306
|
* See also: [method`Json`.ObjectIter.next]
|
|
3307
3307
|
* @returns `TRUE `if @member_name and @member_node are valid; `FALSE` if the end of the object has been reached
|
|
3308
3308
|
*/
|
|
3309
|
-
next_ordered(): [ /* returnType */ boolean, /* member_name */ string
|
|
3309
|
+
next_ordered(): [ /* returnType */ boolean, /* member_name */ string, /* member_node */ Node ]
|
|
3310
3310
|
}
|
|
3311
3311
|
|
|
3312
3312
|
/**
|
|
@@ -3335,7 +3335,7 @@ interface ParserClass {
|
|
|
3335
3335
|
|
|
3336
3336
|
parse_start: (parser: Parser) => void
|
|
3337
3337
|
object_start: (parser: Parser) => void
|
|
3338
|
-
object_member: (parser: Parser, object: Object, member_name: string
|
|
3338
|
+
object_member: (parser: Parser, object: Object, member_name: string) => void
|
|
3339
3339
|
object_end: (parser: Parser, object: Object) => void
|
|
3340
3340
|
array_start: (parser: Parser) => void
|
|
3341
3341
|
array_element: (parser: Parser, array: Array, index_: number) => void
|
|
@@ -3399,9 +3399,9 @@ interface SerializableIface {
|
|
|
3399
3399
|
|
|
3400
3400
|
// Own fields of Json-1.0.Json.SerializableIface
|
|
3401
3401
|
|
|
3402
|
-
serialize_property: (serializable: Serializable, property_name: string
|
|
3403
|
-
deserialize_property: (serializable: Serializable, property_name: string
|
|
3404
|
-
find_property: (serializable: Serializable, name: string
|
|
3402
|
+
serialize_property: (serializable: Serializable, property_name: string, value: any, pspec: GObject.ParamSpec) => Node
|
|
3403
|
+
deserialize_property: (serializable: Serializable, property_name: string, pspec: GObject.ParamSpec, property_node: Node) => [ /* returnType */ boolean, /* value */ any ]
|
|
3404
|
+
find_property: (serializable: Serializable, name: string) => GObject.ParamSpec | null
|
|
3405
3405
|
set_property: (serializable: Serializable, pspec: GObject.ParamSpec, value: any) => void
|
|
3406
3406
|
get_property: (serializable: Serializable, pspec: GObject.ParamSpec) => /* value */ any
|
|
3407
3407
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/json-1.0",
|
|
3
|
-
"version": "1.7.1-3.2.
|
|
3
|
+
"version": "1.7.1-3.2.7",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Json-1.0, generated from library version 1.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "json-1.0.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit json-1.0.d.cts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@girs/gio-2.0": "^2.78.0-3.2.
|
|
29
|
-
"@girs/gjs": "^3.2.
|
|
30
|
-
"@girs/glib-2.0": "^2.78.0-3.2.
|
|
31
|
-
"@girs/gobject-2.0": "^2.78.0-3.2.
|
|
28
|
+
"@girs/gio-2.0": "^2.78.0-3.2.7",
|
|
29
|
+
"@girs/gjs": "^3.2.7",
|
|
30
|
+
"@girs/glib-2.0": "^2.78.0-3.2.7",
|
|
31
|
+
"@girs/gobject-2.0": "^2.78.0-3.2.7"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "*"
|