People who code: we want your input. Take the Survey

Questions tagged [json]

json is an abbreviation of JavaScript Object Notation. It's a lightweight data-interchange format.

Filter by
Sorted by
Tagged with
5
votes
3answers
2k 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" ...
3
votes
1answer
105 views

How to use joomla.asset.json correctly?

I figured I need to reinstall a template/extension in order to take into account my changes to the joomla.asset.json file. Here is the file I'm currently using: { "$schema": "https://...
3
votes
2answers
137 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 ...
2
votes
0answers
36 views

How to get an AJAX call in component's administrator side

I added a component to my site and it accesses my DB via an AJAX call. In my 'tmpl' folder, I have a 'default.php' file which makes an AJAX call that is received by view.json.php just outside that ...
1
vote
2answers
73 views

Insert multiple rows into a database table using a loop

I am trying to insert post data inside a Joomla table. So within a loop I populate the query with the values of a decoded json but all the time I get this error: Column count doesn't match value ...
1
vote
2answers
72 views

How to display specific K2 extra field of current item with k2 tool module

I am trying to display specific extra field values of a specific item with the K2 tool module. I have tried to get just BRAND, but I'm getting stdClass::brand() error. $db = JFactory::getDBO(); $...
1
vote
2answers
44 views

Create dynamic html markup from values in repeatable field json

In my custom component, I use a repeatable field. Sometimes it is possible that a url_partenaire element is an empty string because it is not mandatory. var_dump($this->item->...
1
vote
1answer
35 views

How to store component parameters after modification

As I understand it, the current values of a component configuration are stored as JSON in the params field of the #__extensions database table, in the entry that matches the component name as element. ...
1
vote
2answers
245 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"},"...
0
votes
1answer
62 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
142 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
2answers
185 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
1answer
135 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 ...
0
votes
0answers
19 views

Adding Azuracast JSON file to my AM HTML5 AUDIO PRO PLAYER in joomla

I need help for a problem that i didn't found solution. we have a web radio created with joomla and we start to put our programs 24h/24. I bought an AM HTML5 AUDIO PRO PLAYER and everything work fine ...
0
votes
1answer
22 views

Schema markup votes

Good evening. I need help with schema markup for product. Microdata or ld+json. I managed to markup content but i can't make aggregateRating to get rating from standard vote plugin. I tried several ...
0
votes
0answers
19 views

Joomla carousel that gets its content dynamically from an external json file

I am wondering if there is a carousel module for Joomla that can consume an api's json response to update carrousel database, at some interval, and generate the visual result. The idea is to generate ...
0
votes
1answer
50 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
47 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
0answers
25 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-&...
0
votes
1answer
711 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 ...