xiaohutai / jsonapi

[Bolt Extension] JSON API for Bolt CMS
https://market.bolt.cm/view/bolt/jsonapi
MIT License
55 stars 18 forks source link

Update Parser.php #71

Closed rainpoiss closed 6 years ago

rainpoiss commented 7 years ago

Small fix to handle JSON fields

xiaohutai commented 6 years ago

Hi @rainpoiss Thanks for your pull request.

Your version results in a

            "templatefields": {
                "_fields": {
                    "foo": "Foo",
                    "bar": "Bar",
                    "contenttype": "templatefields"
                }
            },

I think I'd prefer:

            "templatefields": {
                "foo": "Foo",
                "bar": "Bar"
            },

I'll make a new PR

xiaohutai commented 6 years ago

Thanks for your contribution!

I fixed this manually in https://github.com/xiaohutai/jsonapi/commit/b40afca88a40ad0500fbade0a0e8e763ee92d2c4

so make sure you update your code, because TemplateFields are returned slightly different now, see my pervious comment.