Skip to content

Customize JSON Response  #454

Open
Open
@w3villa-amit

Description

@w3villa-amit

Hello Everyone please help me I am using the Active model serializer in my project as i saw the the fast json API serializer is fast from the Active model serializer but i am stuck during customisation of the json response
Here is my previous JSON -:
{id: 3129, status_name: "To-do", name: "hkjhkSASFSFSDAFASDF", owner_id: 0, status_id: 42, points: null,…}
id: 3129
status_name: "To-do"
name: "hkjhkSASFSFSDAFASDF"
owner_id: 0
status_id: 42
points: null
date: "Tuesday, 04 Feb 2020"
project_story_id: 141
index: 0
seen: false
tags: []
owner: null
categories: []
story_categories: []

And here is the Fast Json Api response -:
data: [{id: "3129", type: "story_light",…}, {id: "2987", type: "story_light",…},…]
0: {id: "3129", type: "story_light",…}
id: "3129"
type: "story_light"
attributes: {id: 3129, status_name: "To-do", name: "hkjhkSASFSFSDAFASDF", owner_id: 0, status_id: 42, points: null,…}
id: 3129
status_name: "To-do"
name: "hkjhkSASFSFSDAFASDF"
owner_id: 0
status_id: 42
points: null
date: "Tuesday, 04 Feb 2020"
project_story_id: 141
index: 0
seen: false
relationships: {tags: {data: []}, owner: {data: {id: "0", type: "owner"}}, categories: {data: []},…}
tags: {data: []}
owner: {data: {id: "0", type: "owner"}}
categories: {data: []}
story_categories: {data: []}

Please Help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions