Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

netresearch/jsonmapper v4.4.0

Map nested JSON structures onto PHP classes
Package summary
Share
1
issue
1
high severity
license
1
1
license
1
OSL-3.0
Package created
27 Jan 2014
Version published
28 Jan 2024
Maintainers
1
Total deps
1
Direct deps
0
License
OSL-3.0

Issues

1

1 high severity issue

high
Recommendation: Validate that the package complies with your license policy
via: netresearch/jsonmapper@v4.4.0
Collapse
Expand

Licenses

Open Software License 3.0

Strongly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
sublicense
modify
distribute
commercial-use
Cannot
use-trademark
hold-liable
Must
disclose-source
include-copyright
include-license
1 Packages, Including:
netresearch/jsonmapper@v4.4.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of netresearch/jsonmapper 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does netresearch/jsonmapper do?

Netresearch/JsonMapper is a powerful PHP tool for mapping nested JSON data onto PHP classes. This package is designed to take data retrieved from a JSON web service and convert it into nested objects and arrays - utilizing your custom model classes. This function is similar to the SOAP parameter mapping offered by PHP's SoapClient but designed specifically for JSON data. JsonMapper automatically maps JSON data onto class properties, converting them into the appropriate simple types or objects without relying on any schemas or imposing the need for any JSON-specific code in your model classes.

How do you use netresearch/jsonmapper?

To use Netresearch/JsonMapper, you need to register an autoloader that supports PSR-0 compatible classes, create an instance of the JsonMapper object, and then call either the map or mapArray method depending on your data. Below is an example of its usage in code:

require 'autoload.php';
$mapper = new JsonMapper();
$contactObject = $mapper->map($jsonContact, new Contact());

For mapping an array of objects:

require 'autoload.php';
$mapper = new JsonMapper();
$contactsArray = $mapper->mapArray(
    $jsonContacts, array(), 'Contact'
);

Implementations allow you to map JSON data onto complex object structures with useful type detection, error handling, as well as allowances for private properties and functions, and post-mapping callbacks.

Where are the netresearch/jsonmapper docs?

The comprehensive documentation for netresearch/jsonmapper is enclosed within the Readme file of its GitHub repository at https://github.com/cweiske/jsonmapper.git. The Readme provides an in-depth coverage of the package's functions, featuring usage examples, parameter definitions, coding style guidelines, and more.