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

incorrect json output? #8

Open
cremol opened this issue Sep 18, 2015 · 0 comments
Open

incorrect json output? #8

cremol opened this issue Sep 18, 2015 · 0 comments

Comments

@cremol
Copy link

cremol commented Sep 18, 2015

I am trying out your extension and this is what i am getting:

xslt:

<xsl:template match="data">
    <response>
        <xsl:apply-templates select="entries/entry" />
    </response>
</xsl:template>

<xsl:template match="entry">
    <firstname>John</firstname>
    <lastname>Doe</lastname>
</xsl:template>

xml output:

<response>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
</response>

json output:

{
    "response":
        {
            "firstname": [
                "John",
                "John",
                "John"
            ],
            "lastname": [
                "Doe",
                "Doe",
                "Doe"
            ]
        }
}

expected json output:

{
    "response":
        {
            "firstname": "John",
            "lastname": "Doe"
        },
        {
            "firstname": "John",
            "lastname": "Doe"
        },
        {
            "firstname": "John",
            "lastname": "Doe"
        }
}

Looks like the json output is parsed incorrect?

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

1 participant