Jump to content

Output raw json from WebService


Recommended Posts

Hi,

I need to output raw JSON from my WS resource

CleanShot2023-10-04at09_08.38@2x.thumb.png.682e30dffc6039f74d345ac19a33757f.png

Here's my resource config

protected $webserviceParameters = [
    'objectNodeName' => 'dynamic_input_field',
    'objectsNodeName' => 'dynamic_input_fields',
    'fields' => [
        'id_input' => ['required' => true, 'xlink_resource' => 'dynamic_inputs'],
        'id_field' => [],
        'name' => [],
        'value' => ['getter' => 'displayValue'],
        'secondary_value' => [],
        'sku' => ['getter' => 'renderSKU'],
        'type' => [],
        'visible' => [],
        'data' => [],
    ],
];

What do I need to add to the data column. I bet it's something like "raw" => true but I can't find it in the docs

Thank you for your help

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...