# PHP 8.0 - Resource object serialize library

**URL:** <https://discuss.jsonapi.org/t/php-8-0-resource-object-serialize-library/2120>\
**Category:** Uncategorized\
**Created:** [January 11, 2021, 11:10pm UTC](https://discuss.jsonapi.org/t/php-8-0-resource-object-serialize-library/2120 "2021-01-11T23:10:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavelz](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pavelz](https://discuss.jsonapi.org/u/pavelz)\
**Post date:** [January 11, 2021, 11:10pm UTC](https://discuss.jsonapi.org/t/php-8-0-resource-object-serialize-library/2120/1 "2021-01-11T23:10:12Z")

</div>

Hi,  
Want to share with you some code that I was working on.  
In PHP 8.0 was introduced new [Attributes](https://www.php.net/releases/8.0/en.php#attributes) feature. Metadata can be added to class’s method or properties using the attriubutes. Library uses it to map PHP properties and method to JSON:API fields ( attributes or relationships ).

Would like too hear your opinion about the library and how it can be improved.

Gonna use it for my next JSON:API project.

> **[R3VoLuT1OneR/jsonapi-resource](https://github.com/R3VoLuT1OneR/jsonapi-resource)**
>
> PHP 8.0 Library for parsing JSON:API resource in to data response.
