I'm having problems with creating nodes when trying to import json data.

I wrote a post a while ago about importing JSON data into Drupal here - http://www.reddit.com/r/drupal/comments/2oamo9/importing_json_from_exter...
After playing around with the modules cited there I am still having problems in getting my goals fulfilled.
My objectives are to -

1- Import data into Drupal from a JSON file into content type fields and/or field collection fields and save the individual records each as a node. -- When I go to "mysite.com/import" I get a list of feeds of all kinds. When I click on the one I configured to import JSON into a content type, it takes me to a screen with the content type and upon submission it says the title field cannot be left empty. Once I fill in the title field with a name and put in the URL to the JSON file it simply creates one blank instance of the content item with the title I put in, no import is happening.

2- I think my JSON path and field mapping references in my feeds config are correct, I tested them in a path evaluator and they work when I try a single record. Here is the sample of that single record -

{
"attribute_definitions": [
{
"Attribute_ID": 229,
"Attribute_Name": "203_Protein",
"Date_Added": "\/Date(1282416304773-0400)\/",
"Display_Name": "Protein",
"Last_Modified": "\/Date(1282416304773-0400)\/",
"Prefix_Text": "",
"Protein_Factor": 0,
"Protein_Option": false,
"Rounding_Value": 0,
"Suffix_Text": "",
"System_Frequency_ID": 2,
"System_Unit_ID": 7,
"TableName": "Attribute_Definitions"
}
],
"food_categories": [
{
"Active": true,
"Category_ID": 1,
"Category_Name": "Beverages",
"Date_Added": "\/Date(1331355600000-0500)\/",
"Last_Modified": "\/Date(1331355600000-0500)\/",
"TableName": "Food_Categories"
}
],
"food_items": [
{
"ARS_Version": "JUN2011 ",
"Active": true,
"Date_Added": "\/Date(1331355600000-0500)\/",
"FoodCode": "11111000",
"Food_Item_ID": 1,
"Last_Modified": "\/Date(1416858374297-0500)\/",
"ModCode": "000000",
"TableName": "Food_Items",
"food_item_attribute_info": [
{
"Attribute_ID": 229,
"Date_Added": "\/Date(1331355600000-0500)\/",
"Food_Item_ID": 1,
"Last_Modified": "\/Date(1416858360000-0500)\/",
"TableName": "Food_Item_Attribute_Info",
"Value": 3.1499
}
],
"food_item_descriptions": [
{
"ARS_Version": "JUN2011 ",
"Active": "1",
"Date_Added": "\/Date(1331355600000-0500)\/",
"Description": "Malted milk, fortified, chocolate, with whole milk",
"Food_Item_Description_ID": 228,
"Food_Item_ID": 100,
"Last_Modified": "\/Date(1262322000000-0500)\/",
"Sort_Order": 99,
"TableName": "Food_Item_Descriptions"
}
],
"food_items_categories": [
{
"Category_ID": 1,
"Date_Added": "\/Date(1331303040000-0500)\/",
"Food_Item_ID": 100,
"Last_Modified": "\/Date(1330664400000-0500)\/",
"TableName": "Food_Items_Categories"
}
],
"food_portions": [
{
"Active": true,
"Food_Item_ID": 100,
"Gram_Weight": 235.00,
"IsDefault": true,
"Last_Modified": "\/Date(1331355600000-0500)\/",
"Portion_Code": "1020500",
"Portion_Factor": 2.3500,
"TableName": "Food_Portions"
}
],
"portion_quantities": [
{
"Active": true,
"Date_Added": "\/Date(1331355600000-0500)\/",
"Food_Item_ID": 100,
"IsDefault": true,
"Last_Modified": "\/Date(1262322000000-0500)\/",
"Portion_Code": "1020500",
"Qty_Factor": 1.00,
"Qty_ID": 1644,
"Qty_Value": "1",
"TableName": "Portion_Quantities"
}
]
}
],
"portions": [
{
"Active": true,
"Last_Modified": "\/Date(1331355600000-0500)\/",
"Portion_Code": "1000000",
"Portion_Description": "cup, Better Cheddars",
"TableName": "Portions"
}
],
"system_frequencies": [
{
"Abbreviation": "week",
"Active": true,
"Description": "Weekly",
"System_Frequency_ID": 1,
"TableName": "System_Frequencies"
}
],
"system_units": [
{
"Abbreviation": "Calories",
"Active": true,
"Description": "Calories",
"System_Unit_ID": 1,
"TableName": "System_Units"
},
]
}

My sample JSON file is too large to test fully though. I am wondering about my use of asterisks, here is a sample - $.food_items[*].food_item_attribute_info[*].value[*]. I am trying to run the feed importer but currently when I do it takes me to a page to create an instance of the content type that I linked the feed to and it asks me to enter a title. After it runs the feed import it only ends up with a single blank node with the title I entered.

If you need any more info, please don't hesitate to ask, I'm very thankful for any help you guys can offer!

The list of modules I have enabled for this task -

Feed Import Base (feed_import_base) 7.x-3.3 Feed Import core functions Required by: Feed Import (enabled) Operations Configure

Feed Import (feed_import) 7.x-3.3 Imports content from various file types (like XML, HTML, CSV, JSON, ...) or from databases Requires: Feed Import Base (enabled) Operations Configure

Feeds Admin UI (feeds_ui) 7.x-2.0-alpha8 Administrative UI for Feeds module. Requires: Feeds (enabled), Chaos tools (enabled), Job

Scheduler (enabled) Required by: Feeds Tamper Admin UI (enabled) Configure

Feeds Import (feeds_import) 7.x-2.0-alpha8 An example of a node importer and a user importer. Requires: Feeds (enabled), Chaos tools (enabled), Job Scheduler (enabled)

Feeds Tamper Admin UI (feeds_tamper_ui) 7.x-1.0 Administrative UI for Feeds Tamper module. Requires: Feeds Tamper (enabled),

Feeds (enabled), Chaos tools (enabled), Job Scheduler (enabled), Feeds Admin UI (enabled)

Feeds Tamper PHP plugin (feeds_tamper_php) 7.x-1.1 Feeds Tamper plugin to execute php code

Feeds Tamper (feeds_tamper) 7.x-1.0 Modify feeds data before it gets saved. Requires: Feeds (enabled), Chaos tools (enabled), Job
Scheduler (enabled) Required by: Feeds Tamper Admin UI (enabled) Permissions

Feeds (feeds) 7.x-2.0-alpha8 Aggregates RSS/Atom/RDF feeds, imports CSV files and more. Requires: Chaos tools (enabled), Job Scheduler (enabled) Required by: Feeds Admin UI (enabled), Feeds Import (enabled), JSONPath Parser (enabled), Feeds News (disabled), Feeds Self Node Processor (disabled), Feeds Tamper (enabled), Feeds Tamper Admin UI (enabled), Field Collection Feeds (enabled), Node export feeds (enabled), Roles and Permissions (disabled) Permissions

Field Collection Feeds (field_collection_feeds) 7.x-1.0-alpha3 Provides feeds integration for field collection. Requires: Field collection (enabled), Entity API (enabled), Feeds (enabled), Chaos tools (enabled), Job Scheduler (enabled)

JSONPath Parser (feeds_jsonpath_parser) 7.x-1.0-beta2+15-dev Parse a JSON document using JSONPath. Requires: Feeds (enabled), Chaos tools (enabled), Job Scheduler (enabled)
Node export feeds (node_export_feeds) 7.x-3.0 Node export feeds importer. This is a more advanced importer than the one built into node export, but tricky to use. Requires: Feeds (enabled), Chaos tools (enabled), Job Scheduler (enabled), Node export (enabled), Universally Unique ID (enabled)

Thanks for any help you can offer,

Comments

twistor’s picture

Priority: Major » Normal
Status: Active » Closed (cannot reproduce)
Issue tags: -json, -drupal 7, -feeds importer, -JSONPath, -feeds tamper, -Feeds

Closing due to inactivity.

I hope you got this resolved. I think this is a rare case that there's too much information to deal with. I cannot tell what you are asking.