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.
							
						Module std.json
Implements functionality to read and write JavaScript Object Notation values.
JavaScript Object Notation is a lightweight data interchange format commonly used in web services and configuration files. It's easy for humans to read and write, and it's easy for machines to parse and generate.
Warning: While JSONValue is fine for small-scale use, at the range of hundreds of megabytes it is
known to cause and exacerbate GC problems. If you encounter problems, try replacing it with a stream parser. See
also https://forum.dlang.org/post/[email protected].
References
Example
import stdFunctions
| Name | Description | 
|---|---|
| 
									parseJSON(json, maxDepth, options)
								 | Parses a serialized string and returns a tree of JSON values. | 
| 
									parseJSON(json, options)
								 | Parses a serialized string and returns a tree of JSON values. | 
| 
									toJSON()
								 | Takes a tree of JSON values and returns the serialized string. | 
| 
									toJSON(json, root, pretty, options)
								 | 
Classes
| Name | Description | 
|---|---|
| 
									JSONException
								 | Exception thrown on JSON errors | 
Structs
| Name | Description | 
|---|---|
| 
									JSONValue
								 | JSON value node | 
Enums
| Name | Description | 
|---|---|
| 
									JSONFloatLiteral
								 | String literals used to represent special float values within JSON strings. | 
| 
									JSONOptions
								 | Flags that control how JSON is encoded and parsed. | 
| 
									JSONType
								 | Enumeration of JSON types | 
Authors
Jeremie Pelletier, David Herberth
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.