Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom handler documentation #379

Closed
mikeSimonson opened this issue Apr 22, 2014 · 1 comment
Closed

custom handler documentation #379

mikeSimonson opened this issue Apr 22, 2014 · 1 comment

Comments

@mikeSimonson
Copy link

Hum.

Do you know where there might be any documentation on how to implement the handler of the handlercallback or the encoder ?

Right now I can output

<MyElement generator="zend" version="1.0">
    <xml_method>
        <getVersion>
            <response>1</response>
            <status>success</status>
        </getVersion>
    </xml_method>
</MyElement>

And I need to be able to remove the the <xml_method> element to have this :

<MyElement generator="zend" version="1.0">
        <getVersion>
            <response>1</response>
            <status>success</status>
        </getVersion>
</MyElement>

I can't find any documentation on how to do that.

@goetas
Copy link
Collaborator

goetas commented Apr 3, 2017

Sorry for the incredibly long feedback loop.
http://jmsyst.com/bundles/JMSSerializerBundle/master/configuration#handlers you have a way to register a custom handler.

Inside your custom handler you can just visit the inner object with `graphNavigator->accept(object.getVersion())

@goetas goetas closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants