Skip to content

Simple serializer any PHP type or structure to simple scalar array.

License

Notifications You must be signed in to change notification settings

baraja-core/serializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Serializer

A simple serializer that creates a simple scalar array based on any PHP object or other data structure.

The serializer automatically handles backward and forward compatibility. Automatically handles security.

The output is ready to be sent via REST API.

How to use

class DTO {
	public function __construct(
		public string $name,
	) {
	}
}

$serializer = \Baraja\Serializer\Serializer::get();
var_dump($serializer->serialize(
	new DTO(name: 'Jan'),
));

About

Simple serializer any PHP type or structure to simple scalar array.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages