mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
33 lines
427 B
Markdown
33 lines
427 B
Markdown
|
---
|
||
|
id: aca7d3f1-9107-4122-88cc-2ef05d9ec396
|
||
|
title: serialization
|
||
|
---
|
||
|
|
||
|
# Origin
|
||
|
|
||
|
English series "in order"
|
||
|
|
||
|
# Defintion
|
||
|
|
||
|
The process of taking data from one format and converting it to a more
|
||
|
generic form that can be used by other programs.
|
||
|
|
||
|
# Example
|
||
|
|
||
|
``` javascript
|
||
|
const data = {
|
||
|
hello: 'world'
|
||
|
}
|
||
|
|
||
|
JSON.stringify(data)
|
||
|
```
|
||
|
|
||
|
``` python
|
||
|
import json
|
||
|
|
||
|
dataFromJS = "{hello: 'world'}"
|
||
|
|
||
|
# parse
|
||
|
x = json.loads(dataFromJS)
|
||
|
```
|