JSON or JavaScript Object Notation

learn more… | top users | synonyms

0
votes
1answer
21 views

Drupal Json Output strange characters when pulling from other language

Hi Fellow drupal experts, I have a problem, I developed a custom page intended to do a drupal json output : and here is the code : function blogpull_menu() { $items = array(); ...
2
votes
2answers
41 views

Using migrate with a multi-page / paginated source

I have a working module pulling a JSON feed into Drupal using the Migrate module. However, the feed is paginated, and I am only getting the first page of results (ordered DESC on creation, so giving ...
0
votes
2answers
60 views

custom block menu path returns json Ok, but a 404 status header

I created a custom path via hook_menu with a page callback to a function that prints json. It all works in the sense that requesting: http://cms.tripchi.com/tripchi/getme returns my JSON, but the ...
0
votes
1answer
46 views

Drupal Services 3 Post new node with Image Field and Entity Reference (returns status 200, nid:null)

I'm trying to create a new node using Drupal 7 + Services 3. The node type is 'activity_photo' has an image field, and a reference to a node. This is what I'm posting to the service { ...
0
votes
2answers
96 views

How to receive JSON data in controller with Drupal 8?

I'm using AngularJS one of my module's settings page, so I have a javascript object in client side as a model. Could anyone help me please, how to catch this data in a controller if I send it as JSON ...
0
votes
0answers
36 views

RESTful web services 500 or 406 Error when “£” is in a value

I'm using RESTful web services and Node.js to export a Mongo database into Drupal. This is working fine, however I get the occasional 500 or 406 error. I've narrowed it down to a "£" sign. In node I'm ...
0
votes
1answer
65 views

Multiple points openlayers geojson display only the last of it

I made a module retrieving data with geodata. The import feature allows to create a file in geojson. So, i'd like to display the points and the data without using Views, only openlayers module. I saw ...
1
vote
2answers
62 views

Drupal function to convert node into Json object

I would like to know if any drupal function is readily available which converts the node object into Json object so that i can return it in the menu callback function in Ajax call. thanks, Ahmad
0
votes
1answer
221 views

Converting JSON to select list options

I have an array that I have JSON decoded from a JSON object. Below is my array I am using for select options. The problem is each select options has a option group with a number (0-11). How can I ...
0
votes
0answers
54 views

drupal 7 views - access entire (!) views content after ajax refresh as json

im facing the following situation: i have a view with exposed filters. after the user has altered the view using the filters, i need to access the view's entire data as json. therefore its not enough ...
0
votes
1answer
78 views

Changing numbers of render-blocking JavaScript and CSS

I have a drupal 7 site. I use the Advanced CSS/JS Aggregation module In the past I asked this question, and tried to improve performance and "Eliminate render-blocking JavaScript and CSS in ...
2
votes
1answer
103 views

Drupal 7 - HTTP/AJAX/JSON responses at same URL with Accept Header (like D8)

Drupal 8 has this new amazing in-built functionality for handling requests from browsers and via AJAX at the same URL using the Accept header, which makes the CTools way of adding "nojs" to URLs, and ...
0
votes
1answer
105 views

Drush make unable to determine mime type for js

On every .js library that needs to be downloaded, I keep getting errors like: https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js. Unable to determine mime type for ...
2
votes
3answers
416 views

Drupal 7 - How do I parse JSON data from a website and import them as Nodes and have them update hourly?

I have drupal 7 with the Feeds and FeedsJSONParser module installed, but I can't seem to figure out how to configure this to parse the feeds. I want to parse the following feeds into their own nodes: ...
0
votes
1answer
20 views

Services 3.0 Json string reveived with underscores

I am using D7 services 3.0 and im sending data from an app. I use the json.stringify function before sending the data to my endpoint. However some characters are being replaced by underscores. For ...
2
votes
1answer
69 views

Drupal Services node filtering based on taxonomy terms

I followed this post, I am able to filter nodes based on content type and other parameters http://test/api/node?parameters[nid]=1&parameters[status]=1 but I am not able to filter based on ...
0
votes
1answer
48 views

Why page call back is not needed in Ajax jQuery Drupal 6?

function example_menu() { $items['example-menu'] = array( 'page callback' => 'get-result', 'access arguments' => array('access content'), 'type' => MENU_CALLBACK, ...
0
votes
1answer
183 views

How to Post JSON data to Cart service in Drupal Commerce Services

I'm uses Drupal commerce services for mobile commerce. But I don't know how to Post jSON to REST service Cart or Order. With Comment services I"m post JSON successful as below: URL: ...
1
vote
1answer
138 views

Get JSON geolocation data into Google Maps Module [closed]

I have some JSON data with lat/lon values. I'm trying to plot these points on a google maps module. Which google maps module should I use and what is the easiest way to go about this? Thanks
1
vote
2answers
103 views

drupal_json_output() output ascii

I have a module that populate commerce cart product titles. The function looks like this: function spcart_get(){ global $user; $order = commerce_cart_order_load($user->uid); $wrapper = ...
0
votes
0answers
76 views

Creating JSON-RPC PHP client/server setup: permissions question

I am currently creating two modules in two sites, a client and a server on each site respectively. I want the client to be able to be called from code in any module that needs to communicate with the ...
0
votes
1answer
74 views

Migrate : Update not working

Im using the migrate module to import data from a json feed. Mostly work fine however, i require that each time the feed is imported , updated records in the source are updated in the destination if ...
0
votes
1answer
66 views

Ordering results for D7 form autocomplete fields

I've done the cursory Googling but so far haven't found anything close to an answer for this. I'm using the Masquerade module with a custom module on top to extend it and make its searching ...
1
vote
1answer
97 views

How to render a nodequeue queue as custom JSON (Drupal 6.x)?

What would be the most sensible way to render a nodequeue queue in a custom JSON format (using Drupal 6) We have a nodequeue that is both included in the UI in various places and served in a RSS ...
5
votes
2answers
814 views

How to create user with role(s) through REST service (Drupal 7)

I could able to create a new user by the following JSON format.(Using POSTER add-on to post this data to REST service.) { "name":"user34", "pass":"3323", "mail":"sample@example.com", ...
1
vote
1answer
798 views

Register User with Services (JSON) with Custom Fields

I am trying to register a new user on Drupal7 via services with JSON. Actually I am posting info from JAVA (android) with JSON format to the server with services module enabled. A sample successful ...
0
votes
0answers
203 views

Colorbox Modal Does Not Open for Flickr JSON Request

I have created a Flickr JSON request that returns a set of thumbnail images. Clicking on the thumbnail should open the Colorbox modal and display the image. I have this working in a FIDDLE. However, ...
0
votes
1answer
200 views

date filter not working in querystring

We have used Drupal7 and Service3 module .We have created a service view and date (between operator used) filter working there. We have added service view as .json format and pass date in query string ...
0
votes
2answers
54 views

Feeding JSON into a Content Type and allow for updates

So I have a JSON feed coming from a provider that I'd like to turn into a node type for D7. Within this feed we have a lot of common things like Bios, Names, Pictures, stats, etc. This feed can ...
0
votes
0answers
44 views

Properly parse json flickr strings from the body markup

I have disected the body field of the node: $body = $variables['node']->body['und'][0]['value']; and I got: ...
1
vote
1answer
381 views

Add JS to specific pages AFTER all other JS

I am working with JSON to theme Google Maps in the api v3. I have my custom JSON script as an external JS file, and I am currently referencing it in html.tpl.php after the other scripts are loaded. ...
-1
votes
1answer
249 views

How to display JSON returned (from external REST API) in a Block? [my code attempt inside]

I am trying to display the data from a REST API (URL: 'http://api.kivaws.org/v1/loans/38239/lenders.json') to display in a block. Below is my code. It is not working, any hint on why will be sincerely ...
1
vote
0answers
72 views

Drupal Feed Importer - Parse JSON doument

I am really struggling with the syntax for importing JSON feeds, so much so that I currently cannot even import one but of this. Does anyone know the context for this and how I can grab the fields? ...
3
votes
1answer
163 views

How to get location (longitude and latitude) from json data show on map?

I am using Openlayers module to have a map. In my json, it has longitude and latitude field. I want to get them to show on map so that user can see the location with the marker. Is there any way to ...
1
vote
0answers
86 views

Search a URL list, return JSON values into a dynamically generated table

I am looking for a Drupal Service or a Module (or a link to a working example) of this arrangement: There's a Search form. Placing and submitting the search will make a REST call for certain values ...
0
votes
0answers
29 views

How to save data in the database using web service in drupal 7 [duplicate]

I am new for drupal, I want to save data through web service. In my form there are four fields name, email, description and file. I don't know how to save this data through web service in database. I ...
1
vote
2answers
573 views

Passing multiple array to drupal_json_output() is not giving correct output in jquery ajax

Passing multiple array to drupal_json_output() is not giving correct output in jquery ajax. I am using a menu_callback function and returning a multiple array like function test_callback() { ...
0
votes
1answer
159 views

call a function of my custom module from js [closed]

i'm new developer in drupal...sorry for my question.. With my custom module i'm creating a block that show searched tweets with hashtags. I'm using an external library TwitterAPI 1.1. So,i created a ...
1
vote
3answers
1k views

How to configure REST server to create new node from URL parameters?

Drupal 7.23 Services 7.x-3.5 I've followed the instructions for setting up Services module, including https://drupal.org/node/1699354. I got the endpoint setup successfully. I am able to retrieve ...
3
votes
1answer
403 views

How to add data to Drupal.settings without drupal_add_js

Is there any way to add some variables to Drupal.settings without drupal_add_js (with setting argument). I'm creating a site that has a custom ctools popup style but I'm not feeling good with ...
0
votes
0answers
18 views

How to use use REST APIs in Drupal? [duplicate]

I will present the problem as an example: If I want to use the twitter API: https://dev.twitter.com/docs/api/1.1/get/statuses/mentions_timeline In the link above, under "Example Request", it shows ...
1
vote
1answer
309 views

Parse error on JSON response containing URL value

In my code it is making Ajax request for json data. For JSON output I am using drupal_json() function. But on browser side it is invoking error handler instead of success handler and getting ...
0
votes
2answers
132 views

Override autocomplete provided by module to not suggest current user(self)

I hope it's pretty clear from my question title itself. I want to override autocomplete provided by module such as privatemessage to not suggest the current user(self) who is trying to send message. I ...
1
vote
2answers
174 views

Expand Addressfield Components in Views

Situation : I have added few more fields in user registration form using account settings->manage fields. The type of the field is cck address field. I created a new view as json document, and I ...
0
votes
0answers
66 views

JSON Parser Duplicating Nodes on Cron Import

I have a cron set up to import using JSON Parser / Feeds, but with each import it duplicates the existing nodes. I'd really like to only import the new items. Is this possible? What am I missing?
0
votes
1answer
59 views

What should be the optimum values for Minimum cache lifetime and Expiration of cached pages

i am working on a mobile app. Using drupal json views i am parsing the data and displaying on the device. It takes nearly 10 sec to load 10 records on the device. Initially i thought this might be due ...
0
votes
0answers
634 views

Ajax doesn't properly work: The success function is called but the page is being printed instead of the page callback results

I am using AJAX in Drupal 7 to get data from the bounds of a map, serialize it as a string, and submit as post to server to be added as a filter for a view to make a display respond to changes in zoom ...
0
votes
1answer
826 views

How do I PUT update on a node using services 3

I have a node with field_order_status field(not required) in list(text) type and radio button widget and I want to update a node(nid:95) but my sample JSON PUT content(application/json) throws Status ...
0
votes
1answer
35 views

Generate page for each json entry

I'm new to Drupal. I want to customize the search module in order to show results from an external JSON. I was able to insert JSON data in the search page, but now I want to generate a page for each ...
3
votes
2answers
2k views

How I can return JSON data with Drupal 7

card.module drupal_add_js('jQuery(document).ready(function () { currentRequest = $.ajax({ timeout:0, cache: false, url: pageUrl, dataType: "json", type: "GET", success: function(data){ ...