1

I want to use a custom field in my Views REST export, but rather than having "nothing": "My custom text", I would like "mycustomtext": "My custom text". Is there a way to do this from within the UI?

5

Serializer settings: force using field & json

Show: fields

Show settings: type an alias for each field

Above settings are shown in the images below

enter image description here

enter image description here

enter image description here

| improve this answer | |
  • 2
    Despite “no code answer” requested, it’s also quite easy to provide your own Normalizer class if this doesn’t exactly suit. – Kevin Mar 10 '18 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.