View source code
							
							
						
								Display the source code in std/json.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Struct std.json.JSONValue
JSON value node
						
				struct JSONValue
				;
						
					
				Constructors
| Name | Description | 
|---|---|
| this(arg) | Constructor for JSONValue. Ifargis aJSONValueits value and type will be copied to the newJSONValue.
 Note that this is a shallow copy: if type isJSONTypeorJSONTypethen only the reference to the data will
 be copied.
 Otherwise,argmust be implicitly convertible to one of the
 following types:typeof(null),string,ulong,long,double, an associative arrayV[K]for anyVandKi.e. a JSON object, any array orbool. The type will
 be set accordingly. | 
Properties
| Name | Type | Description | 
|---|---|---|
| array[get] | inout(JSONValue[]) | Value getter/setter for JSONType. | 
| arrayNoRef[get] | inout(JSONValue[]) | Value getter for JSONType.
 Unlikearray, this retrieves the array by value and can be used in @safe code. | 
| boolean[get, set] | bool | Value getter/setter for boolean stored in JSON. | 
| floating[get, set] | double | Value getter/setter for JSONType. Note that despite
 the name, this is a 64-bitdouble, not a 32-bitfloat. | 
| get[get] | inout(T) | Generic type value getter
 A convenience getter that returns this JSONValueas the specified D type. | 
| integer[get, set] | long | Value getter/setter for JSONType. | 
| isNull[get] | bool | Test whether the type is JSONType | 
| object[get] | inout(JSONValue[string]) | Value getter/setter for JSONType. | 
| objectNoRef[get] | inout(JSONValue[string]) | Value getter for JSONType.
 Unlikeobject, this retrieves the object by value and can be used in @safe code. | 
| str[get] | string | Value getter/setter for JSONType. | 
| type[get] | JSONType | Returns the JSONType of the value stored in this structure. | 
| uinteger[get, set] | ulong | Value getter/setter for JSONType. | 
Methods
| Name | Description | 
|---|---|
| opApply(dg) | Implements the foreach opApplyinterface for json arrays. | 
| opApply(dg) | Implements the foreach opApplyinterface for json objects. | 
| opBinaryRight(k) | Support for the inoperator. | 
| opEquals(rhs) | |
| opIndex(i) | Array syntax for json arrays. | 
| opIndex() | Hash syntax for json objects. | 
| opIndexAssign(value, key) | Operator sets valuefor element of JSON object bykey. | 
| toPrettyString(sink, options) | |
| toPrettyString() | Implicitly calls toJSONon this JSONValue, liketoString, but
 also passes true as pretty argument. | 
| toString() | Implicitly calls toJSONon this JSONValue. | 
| toString(sink, options) | 
Authors
Jeremie Pelletier, David Herberth
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.