PHP Classes

JSON Object Mapper: Create objects of classes mapped from JSON strings

Recommend this page to a friend!
  Info   View files Documentation   View files View files (41)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 153 This week: 1All time: 9,047 This week: 560Up
Version License PHP version Categories
json-object-mapper 1.2.0Custom (specified...5.6PHP 5, Data types
Description 

Author

This class create objects of classes mapped from JSON strings.

It can take a given class and extracts the annotations to determine the type of its variables.

The class can parse a JSON string and extracts the values to store in the class variables according to the types defined in the annotations.

The class can also retrieve nested objects to be stored in the class variables declared as such.

Innovation Award
PHP Programming Innovation award winner
September 2017
Winner


Prize: One big elePHPant Plush Mascott
ORMs (Object Relational Mapping) are tools or libraries of code that are used to store and retrieve objects in databases or other types of storage containers.

To do their job, ORMs need to retrieve information from somewhere to determine how to store or retrieve the objects in the container.

This package provides means to retrieve mapping information from annotation comments that have that information defined as JSON data structure strings.

Manuel Lemos
Picture of Julian Finkler
  Performance   Level  
Name: Julian Finkler <contact>
Classes: 8 packages by
Country: Germany Germany
Age: 30
All time rank: 2919172 in Germany Germany
Week rank: 106 Up5 in Germany Germany Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Documentation

Travis Packagist GitHub license Packagist

JOM - JSON Object Mapper

JOM is a powerful object mapper which maps JSON Data into PHP objects.

Installation

You can install this library using composer

$ composer require mintware-de/json-object-mapper

Usage

Check out the documentation

Testing

$ phpunit

Contribute

Feel free to fork, contribute and create pull requests


  Files folder image Files  
File Role Description
Files folder imagedoc (7 files)
Files folder imagesrc (4 files, 1 directory)
Files folder imagetests (3 files, 3 directories)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Doc. Documentation
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  doc  
File Role Description
  Accessible without login Plain text file 1_simple_mapping.md Doc. Documentation
  Accessible without login Plain text file 2_mapping_with_typehints.md Doc. Documentation
  Accessible without login Plain text file 3_mapping_alternative_property_names.md Doc. Documentation
  Accessible without login Plain text file 4_using_transformers.md Doc. Documentation
  Accessible without login Plain text file 5_convert_an_object_to_json.md Doc. Documentation
  Accessible without login Plain text file 6_multiple_annotations.md Doc. Documentation
  Accessible without login Plain text file index.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageException (4 files)
  Plain text file DateTimeField.php Class Class source
  Plain text file JsonField.php Class Class source
  Plain text file ObjectMapper.php Class Class source
  Plain text file TransformerInterface.php Class Class source

  Files folder image Files  /  src  /  Exception  
File Role Description
  Plain text file ClassNotFoundException.php Class Class source
  Plain text file InvalidJsonException.php Class Class source
  Plain text file PropertyNotAccessibleException.php Class Class source
  Plain text file TypeMismatchException.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageObjects (7 files)
Files folder imageres (7 files)
Files folder imageTransformer (3 files)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script
  Plain text file FailPerson.php Class Class source
  Plain text file ObjectMapperTest.php Class Class source

  Files folder image Files  /  tests  /  Objects  
File Role Description
  Plain text file Address.php Class Class source
  Plain text file Autobot.php Class Class source
  Accessible without login Plain text file OtherAnnotation.php Test Unit test script
  Plain text file Person.php Class Class source
  Plain text file PersonWithEscapedFQCN.php Class Class source
  Plain text file PersonWithMultipleAddresses.php Class Class source
  Accessible without login Plain text file SimplePerson.php Test Unit test script

  Files folder image Files  /  tests  /  res  
File Role Description
  Accessible without login Plain text file person.json Data Auxiliary data
  Accessible without login Plain text file person_field_variation.json Data Auxiliary data
  Accessible without login Plain text file person_multiple.json Data Auxiliary data
  Accessible without login Plain text file person_multiple_addresses.json Data Auxiliary data
  Accessible without login Plain text file person_protected.json Data Auxiliary data
  Accessible without login Plain text file person_string_address.json Data Auxiliary data
  Accessible without login Plain text file transformer.json Data Auxiliary data

  Files folder image Files  /  tests  /  Transformer  
File Role Description
  Plain text file MicrotimeTransformer.php Class Class source
  Plain text file PaddingTransformer.php Class Class source
  Plain text file TagTransformer.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:153
This week:1
All time:9,047
This week:560Up