SlideShare a Scribd company logo
Serialization
Masters Academy, 2018
Serialization
Serialization is the process of translating data structures or
object state into a format that can be stored or transmitted
and reconstructed later.
Serialization
Object BitMap
Serialization
- Store data or object state
- Transmit data or object state
- Call remote procedure (SOAP)
- Detect changes in a data
- Store and process scientific data (HDF, GRIB)
Serialization
- JSON (JavaScript Object Notation)
- XML (Extensible Markup Language)
- YAML (YAML Ain’t Markup Language)
- Binary
Serialization JSON
- Specified by Douglas Crockford
- Specified in the 2000s
- Easy-to-access
- Human-friendly
- Represented with a string
- Security issue - JS eval()
Serialization XML
- XML stands for eXtensible Markup Language
- XML is a markup language
- XML was designed to store and transport data
- XML was designed to be self-descriptive
Serialization YAML
- Indented delimiting
- Non-hierarchical data models
- Practical considerations
- Security
- Data processing and representation
Serialization Binary
Binary serialization allows single objects or complex models to
be converted to binary streams, which may be stored in files or
transported to other systems.
Serialization RegExp
A sequence of characters that define a search pattern
str = 'Hello, My dear Masters'
/^Hello, My dear Masters$/
/.*/
/.+/
/[a-zA-Z, ]/
/[a-z]+|[A-Z+]|,| /
/^H.+rs$/
/^H.+(rs)$/
Serialization RegExp
d 0-9 Numbers
w a-zA-Zа-яА-Я Characters
^ Starts with
$ Ends with
. Any
[azb] Range of possible characters
(a|z|b) Set of possible characters
* Any count (including 0)
+ At least one
? Exact one
Thanks for attention

More Related Content

Serialization