jmsserializerbundle Questions

2

Solved

I'm trying to write a REST API which consumes a JSON from a PUT request in Symfony2. Deserializing the JSON to an entity sort of works – but the JMS Serializer seems to coerce types from the JSON i...

2

I'am using the JMS Serializer. The JsonSerializer gives me an incorrect array format when it works with Doctrine ArrayCollection types. The spected results should follow the format [ {}, {} ] but i...
Toniatonic asked 13/6, 2015 at 17:43

2

We are using Symfony2 FOSRestBundle with JMSSerializerBundle for developing REST APIs to be consumed by mobile developers. The API response in JSON format returns 'null' as value of properties whe...
Semiyearly asked 23/7, 2015 at 7:15

1

I have entity: <?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation\Groups; //... /** * @ORM\Entity(repositoryClass="AppBundle\Repository\UserRe...
Winchell asked 16/2, 2016 at 15:51

2

Problem: When serializing a collection of Doctrine enitities the collection will still have 2 items though the items are empty. Background: I have a few entities which extends each other B exten...
Mcglone asked 12/8, 2014 at 13:3

2

Solved

I have problem with exclusion of some KNP Paginator properties with JMS Serializer. First, this is included in composer.json ... "jms/serializer-bundle": "~0.13", "knplabs/knp-paginator-bundle": ...
Cornellcornelle asked 30/11, 2014 at 14:31

2

Solved

I am attempting to use a custom handler for JMS Serializer Bundle class CustomHandler implements SubscribingHandlerInterface { public static function getSubscribingMethods() { return array( ar...
Cantatrice asked 15/12, 2014 at 0:33

3

I'm using the JMS Serializer. And I found out that the performance is really bad when I use big data. I've the following object structure displayed as an array: $jsonData = array( 'message' =>...
Draftee asked 24/5, 2013 at 10:59

2

Solved

My config is jms_serializer: metadata: auto_detection: true directories: NameOfBundle: namespace_prefix: "" path: "@VendorNameOfBundle/Resources/config/serializer" My YML file named Entity...
Malkamalkah asked 18/1, 2015 at 23:55

2

Solved

Context I found a lot of questions about partial API response with FOSRest and all the answers are based on the JMS serializer options (exlude, include, groups, etc). It works fine but I try to ach...
Nannettenanni asked 11/12, 2014 at 11:5

1

Solved

I am facing a weird problem relating to UUIDs. I have developed a REST API using Symfony2+FOSRestBundle+JMSSerializer. As I need to update some tables from two sources I thought of using UUID as ...
Kenosis asked 30/10, 2014 at 17:37

2

Solved

I making a RESTful app with Symfony and FOSRestBundle. FOSRestBundle uses JMS Serializer to serialize data to json format. I have everything working with one little issue. This is my Entity class ...
Alongshore asked 23/5, 2013 at 6:48

1

Solved

I have an abstract parent (mapped super-)class which has several children with different properties which I'd like to deserialize. I'm storing the data using MongoDB and Doctrine ODM, so I also ha...

1

I'm try to serialize a MongoDB document with embedded documents within Symfony 2.1. I am using the JMSserializer and Mongodb-odm bundles. I have the following Documents entities. // Blog namespa...
Surrebuttal asked 8/11, 2012 at 7:5

1

Solved

I would like to handle a single object property on serialization and deserialization with JMSSerializer. Suposing we have this class : class Task { const STATUS_PENDING = 0; const STATUS_OVER =...
Greenheart asked 19/12, 2013 at 17:1

1

Solved

The symfony sponsored project \Doctrine\ORM\Mapping\Driver\SimplifiedYamlDriver is really useful in my project to keep Entity file names clean and simple. However, JMSSerialize assumes that the nam...
Sympathy asked 14/11, 2013 at 19:46

1

Solved

I'm trying to return a JSON object('Module') with a ManyToOne link to an Sonata\MediaBundle\Entity through FOSRestBundle and JMS Serializer. How should I go about doing that? Here's a hack that I ...
Elaboration asked 23/9, 2013 at 10:28

1

Solved

After successfully deserializing a json string to a Doctrine Entity with associations. When persisting, Doctrine detects these associations as "new entities" always. How can I update the associatio...
Variole asked 23/7, 2013 at 17:12

2

Solved

I need implement RESTful API for my site on symfony 2, so i use FOSRestBundle + JMSSerializerBundle I have such serializer yml for my entity: Acme\DemoBundle\Entity\Product: exclusion_policy: AL...
Mature asked 23/1, 2013 at 8:20

1

Solved

I am trying to use ExclusionPolicy however I keep getting an "Annotation does not exist, or could not be auto-loaded" error. Here is the exact error being thrown out: [Semantical Error] The ann...
Chlorothiazide asked 26/4, 2013 at 5:24

1

Solved

I'm trying to add a method to serialize, but JMS Serialize does not show the field. use JMS\Serializer\Annotation\Groups; use JMS\Serializer\Annotation\VirtualProperty; use JMS\Serializer\Annotati...
Perorate asked 15/4, 2013 at 15:21

2

Solved

I have two entities I wish to serialize with the JMSSerializerBundle. The Music Entity has a mapping-file with exclusion_policy: NONE. The Music entity has a field of the entity User from FOSUserB...
Attenborough asked 18/10, 2012 at 17:15

1

Solved

I'm using Symfony2 and JMSSerializerBundle to build an API. The system that JMSSerializer provides to set different ways of serializing objects using groups is quite useful, however, I'm missing a ...
Debauch asked 2/12, 2012 at 0:50

1

Lets say I want to create an XML-response that will looks something like the following: <?xml version="1.0" encoding="utf‐8"?> <product xmlns="urn:com.acme.prods" xmlns:atom="http://www.w...
Yahairayahata asked 13/9, 2012 at 13:15

1

Solved

I have a problem with deserializing serialized collection of doctrine collections. Couldn't find docs about that and any topics and I'm new with JMSSerializer. When I try deserialize with: $collec...
Matsumoto asked 1/10, 2012 at 19:20

© 2022 - 2024 — McMap. All rights reserved.