× Requests and support related to jBackend.

Trimming Article JSON

More
6 years 7 months ago - 6 years 7 months ago #6331 by Vikas
Trimming Article JSON was created by Vikas
This is my article JSON. It has many fields which are empty or less useful. They tend to have more data usage.
Is it possible to reduce the JSON content?

{
"status":"ok",
"id":"1",
"title":"Monalisa",
"alias":"monalisa",
"featured":"0",
"introtext":"Intro text",
"content":"Conetnt Text",
"catid":"2",
"images":{
"image_intro":"images\/1\/media\/common\/Gioconda.jpg",
"float_intro":"",
"image_intro_alt":"",
"image_intro_caption":"",
"image_fulltext":"",
"float_fulltext":"",
"image_fulltext_alt":"",
"image_fulltext_caption":""

},
"tags":[
{
"id":"2",
"title":"1",
"alias":"1",
"language":"*"
}
],
"associations":[

],
"fields":[
{
"id":"1",
"title":"Non-English",
"name":"non-english",
"type":"textarea",
"default_value":"",

"group_id":"0",
"label":"Non-English",
"description":"",

"required":"1",
"value":"Non-English field",
"rawvalue":"Non-English field"
},
{
"id":"2",
"title":"Lang",
"name":"lang",
"type":"integer",
"default_value":"",

"group_id":"1",
"label":"Lang",
"description":"",

"required":"0",
"value":"22",
"rawvalue":"22"
}
],
"metakey":"",
"metadesc":"",
"metadata":{
"robots":null,
"author":null,
"rights":null,
"xreference":null
},

"language":"*",
"category_title":"Uncategorised",
"category_alias":"uncategorised",
"author":"Super User",
"parent_id":"1",
"parent_title":"ROOT",
"parent_alias":"root",
"parent_route":"",

"created_date":"2017-03-07T20:09:41+00:00",
"modified_date":"2017-09-16T13:51:43+00:00",
"published_date":"2017-03-07T20:09:41+00:00",
"unpublished_date":"-0001-11-30T00:00:00+00:00",
"version":"26",
"hits":"92",
"rating":null,
"rating_count":null,
"state":"1"
}
Last edit: 6 years 7 months ago by Vikas.

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #6339 by admin
Replied by admin on topic Trimming Article JSON
Sorry but currently there is no option to filter the output fields for the content, like the one for the user profile.

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #6643 by Dmytro
Replied by Dmytro on topic Trimming Article JSON
This is the feature which could decrease the traffic, and in particular solve some other questions.
If I need only 2 fields per article to render the app - I don't have to request all possible data.

Example: I need to build a menu from certain pages in a category. Need only id/alias and title. But still, have to request everything! Not appropriate for mobile applications - some pages user will never use, but they will impact the response speed and traffic heavily (we have pages over 100KB, for example).

Could you please consider this feature to be implemented somewhere in the nearest future?

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #6655 by admin
Replied by admin on topic Trimming Article JSON
There is already an option "content_in_article_list", to exclude the content in the list and I thought this was enough to save data (the article is the biggest field usually). But if you need a full "partial response" with a configurable list of fields to get, you can request a custom implementation and/or sponsorize this feature.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds