JSON

PHP: Debugging decoding JSON value problems - jsondecode()

The function jsondecode() function will help convert a json formatted string into JSON object. Using this object we can access its key value pairs of JSON content. Some cases we cannot create JSON object from the string. Below are possible reasons of cannot create JSON objects.

Bidirectional Relationship Support in JSON

Ever tried to create a JSON data structure that includes entities that have a bidirectional relationship (i.e., circular reference)? If you have, you’ve likely seen a JavaScript error along the lines of “Uncaught TypeError: Converting circular structure to JSON”. Or if you’re a Java developer who uses Jackson library, you may have encountered “Could not write JSON: Infinite recursion (StackOverflowError) with root cause java.lang.StackOverflowError”. This article provides a robust working approach to creating JSON structures that include a bidirectional relationship without resulting in these errors.

Drupal Feed Import : Migrate any Website into complete Drupal site -Part 2

To view part 1 Feed configuration In this part explain how to setup importer and importing a JSON file into Drupal content. Importer setup is help to specify our importer parse type and Drupal entity to save parsed data. In addition help cron job to handle importing and create or update entity information’s.

Drupal Feed Import : Migrate any Website into complete Drupal site -Part 1

Feed is module in Drupal to migrate any site into a Drupal website. Feeds support different type of parser to import data into Drupal CSV parser, XLS/EXCEL parser, OPML parser, JSON parser, etc.,. This document helps to import JSON document to Drupal website content. In order to automate the process of instructing your Drupal website to pull content from json file using feeds, go through the following steps: