index.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Serializer
  2. ==========
  3. Introduction
  4. ------------
  5. This library allows you to (de-)serialize data of any complexity. Currently, it supports XML, JSON, and YAML.
  6. It also provides you with a rich tool-set to adapt the output to your specific needs.
  7. Built-in features include:
  8. - (De-)serialize data of any complexity; circular references are handled gracefully.
  9. - Supports many built-in PHP types (such as dates)
  10. - Integrates with Doctrine ORM, et. al.
  11. - Supports versioning, e.g. for APIs
  12. - Configurable via PHP, XML, YAML, or Doctrine Annotations
  13. Installation
  14. ------------
  15. This library can be easily installed via composer
  16. .. code-block :: bash
  17. composer require jms/serializer
  18. or just add it to your ``composer.json`` file directly.
  19. Usage
  20. -----
  21. For standalone projects usage of the provided builder is encouraged::
  22. $serializer = JMS\Serializer\SerializerBuilder::create()->build();
  23. $jsonContent = $serializer->serialize($data, 'json');
  24. echo $jsonContent; // or return it in a Response
  25. Documentation
  26. -------------
  27. .. toctree ::
  28. :hidden:
  29. configuration
  30. usage
  31. event_system
  32. handlers
  33. reference
  34. cookbook
  35. - :doc:`Configuration <configuration>`
  36. - :doc:`Usage <usage>`
  37. - :doc:`Events <event_system>`
  38. - :doc:`Handlers <handlers>`
  39. - Recipes
  40. * :doc:`/cookbook/exclusion_strategies`
  41. - Reference
  42. * :doc:`Annotations </reference/annotations>`
  43. * :doc:`XML Reference </reference/xml_reference>`
  44. * :doc:`YML Reference </reference/yml_reference>`
  45. License
  46. -------
  47. The code is released under the business-friendly `Apache2 license`_.
  48. Documentation is subject to the `Attribution-NonCommercial-NoDerivs 3.0 Unported
  49. license`_.
  50. .. _Apache2 license: http://www.apache.org/licenses/LICENSE-2.0.html
  51. .. _Attribution-NonCommercial-NoDerivs 3.0 Unported license: http://creativecommons.org/licenses/by-nc-nd/3.0/