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

XML output from Marshaller #6

Open
dantodor opened this issue May 31, 2016 · 1 comment
Open

XML output from Marshaller #6

dantodor opened this issue May 31, 2016 · 1 comment

Comments

@dantodor
Copy link

I think there might be a problem with the array marshaller.
If you call the endpoint with "Accept: application/xml" , the XML response is syntactically correct, but the result is doubled. My guess would be replacing this:

Source.fromIterator(() ⇒ persons.iterator).mapAsync(1) { person ⇒
            Marshal(persons.map(person ⇒ PersonV2(person.name, person.age, person.married))).to[NodeSeq]
          }.map(ns ⇒ ByteString(ns.toString))

with this:

Source.fromIterator(() ⇒ persons.iterator).mapAsync(1) { person ⇒
            Marshal(PersonV2(person.name, person.age, person.married)).to[NodeSeq]
          }.map(ns ⇒ ByteString(ns.toString))

Basically I think you're going through the same iterator twice :)

@dnvriend
Copy link
Owner

dnvriend commented Jun 2, 2016

Thanks for notifying me about this issue. I will look into it!

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