Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
32 views

How can I create a custom list formfield from json

I need to create a custom formfield like so: https://docs.joomla.org/Creating_a_custom_form_field_type But the data I want to populate the list with is in a json file. So I can't really do a PHP ...
0
votes
1answer
38 views

Controller Joomla - Output Class construct for color css style

thanks to you i'm learning a lot about php and Joomla Develop! Many thanks! Now i'm trying to understand php class into joomla and construct output i've created this class into my controller.php ...
0
votes
1answer
29 views

How to set HTTP header on Joomla's JSON response?

I am using Joomla\CMS\Response\JsonResponse to send a JSON response. $data= new \stdClass() $data->some_data = 1; $resp = new JsonResponse($data); echo $resp; How to set a HTTP header for the ...
0
votes
1answer
33 views

How to pass a JSON file from a Plugin to a Component?

My intended application is to provide a list of products in a simple Joomla list/table display with check boxes where the end user can click on one or more items, press the print button and the data ...
0
votes
1answer
17 views

Ajax Request returning the whole page not a specifc value

I am trying to make an AJAX Request to my function in my controller and it works, however, it returns me the whole page which i don't want. I have tried encoding it with json but no success i also ...
0
votes
0answers
19 views

JSON to String in Joomla

I have the following method to convert JSON to a String // Convert the JSON-encoded image info into an array $image = new JRegistry; $image->loadString($this->item->image, 'JSON'); $this-&...
2
votes
1answer
61 views

Crawling Joomla websites without parsing website's html

Nowadays many crawlers are using the REST Api features of most CMSs, to be able to crawl websites fast. WordPress and Drupal have their own REST interfaces so indexing any WordPress website is a ...
0
votes
1answer
506 views

Click to upload an image “The server returned an invalid JSON response.” [closed]

When I go into an article, and then click to upload an image I receive the error: The server returned an invalid JSON response. I actually receive the error twice in a row if that helps. Can ...
0
votes
1answer
112 views

How to get data from core components and modules formatted as JSON?

As I would like to use a front-end JavaScript framework within Joomla I would like to know what's an efficient and maintainable, structured way of accessing data from core components (such as ...
1
vote
2answers
119 views

How display values from subform in front end?

I created a simple component with a subform that stores data in a database. Now I need to display this data on the front page. The data is displayed as is from db {"comment0":{"comment":"one"},"...
4
votes
3answers
1k views

How to save data from 2 fields as a JSON string to 1 database table field?

I need help to store data in json format in my DB like {name:'1', name2:'2'}. So far I have this: model/form/category.xml: <fieldset> <field name="name" type="text" ...