Inserting a JSON object into a blank database

I have close to 120 JSON fields in objects. A whole bunch of various versions of this sample JSON object

I really don't have time to map every field, nor do I care if the field title is called Array 0 or some other default.

I just want the data stuffed into a database, maintaining it's structure in indexable format.

JSON is a perfectly valid data structure, why not use it?

I did find this -> https://github.com/adamwulf/json-to-mysql and hypothetically it would do the job. But the software is broke (no error but nothing ever gets populated).

Other alternatives such as https://doctrine-couchdb.readthedocs.org/en/latest/reference/introduction.html involve mapping. I don't have time to map 120 fields and nothing should require mapping, just use the existing.

Whats an easy way to stuff large JSON objects into MySQL, auto building the structure from an existing format?

Category:php Views:0 Time:2018-05-13
Tags: php mysql json

Related post

  • Inserting a JSON Object into a database 2012-02-09

    I am building a DataSnap server in Delphi XE2, and I'm having trouble figuring out the best way to insert the JSON Object that the client sends me into a Database. Here's the format of the object I'm receiving: {"PK":0,"FIELD1":"EXAMPLE","FIELD2":5,

  • When inserting a complex object into an SQL database, when should the object be broken up into its respectful tables? 2009-08-06

    Edit: In short what strategy should one use on insert and select scripts with complex objects (eg. two select calls, one for each table; a single select call with unions)? We have a database insert (postgresql) that includes a list of objects that is

  • Automatically Map JSON Objects into Instance Variables in Ruby 2010-08-26

    I would like to be able to automatically parse JSON objects into instance variables. For example, with this JSON. require 'httparty' json = HTTParty.get('http://api.dribbble.com/players/simplebits') #=> {"shots_count":150,"twitter_screen_name":"si

  • How to convert a json object into HTML format in java? 2010-09-02

    How to convert a json object into HTML in java? --------------Solutions------------- There's no automatic way because a JSON object contains only data while in HTML there's markup semantics (there's no 1:1 mapping between JSON and HTML). In trying to

  • Cannot deserialize JSON object into type 'Raven.Json.Linq.RavenJObject' 2011-05-27

    I've tried building both .NET 3.5 & 4, using Raven.Client.Lightweight-3.5 version 1.0.0.0. Getting the above error running the following code: Any ideas why? public class Test { public string Id { get; set; } public string Name { get; set; } } cl

  • Error deserializing JSON Cannot deserialize JSON object into type 'System.String' 2011-10-25

    I have the following JSON: {"workspace": { "name":"Dallas", "dataStores":"http://.....:8080/geoserver/rest/workspaces/Dallas/datastores.json", "coverageStores":"http://.....:8080/geoserver/rest/workspaces/Dallas/coveragestores.json", "wmsStores":"htt

  • To pass whole JSON objects into controller of MVC 2011-12-09

    I wants to pass whole JSON objects into controller in MVC so that i can access whole object. I am using following code .. Script called in View var Email = { To: $("#txtTo").val(), Text: $("#txtTest").val(), Subject: $("#txtSubject").val() }; $.ajax(

  • How to store JSON object into multi-dimension array 2012-02-08

    I want to store JSON Object into multi-dimension array. appDelegate.serviceIdArray = [response1 valueForKey:@"services_id"]; appDelegate.nameArray = [response1 valueForKey:@"services_name"]; appDelegate.rateArray = [response1 valueForKey:@"rate"]; ap

  • How do I change a JSON object into an array key/value pairs through code? 2012-03-07

    How do I change a JSON object into an array key/value pairs through code? from: { 'name':'JC', 'age':22 } to: ['name':JC,'age':22] //actually, see UPDATE UPDATE: ...I meant: [{"name":"JC"},{"age":22}] --------------Solutions------------- May be you o

  • how to parse json object into select box.. My response is not like array format? So tel me a way to do selectbox? 2013-06-07

    how to parse json object into select box?My response is not like array format? My response is {"select:"<option value=apple>apple<\/option><option value=mango>mango<\/option>"} I tried, $('#listProduct option').html(''); $('#l

  • When I insert a file (object) into a word document the font on the icon is very strange, can I change it to normal font? 2013-10-28

    When I insert a file (object) into a word document the font on the icon is very strange, can I change it to normal font? --------------Solutions------------- Office button> Word options> Advanced> Show document content> uncheck show field

  • Inserting JSON objects into client-side web sql db 2012-02-05

    I'm having trouble loading the objects of my JSON call into a client side sql db. In my specific case, I have 3 objects that are returned from "jQuery.getJSON" and want to insert the value of the "content" key into the client-side web database such t

  • Inserting data from object into database 2011-01-24

    I have an array of objects. Each object contains around 20 members. I need to loop through the array and insert the data from the object into my database. Is there a way of doing this that does not require me to put an INSERT statement within the bod

  • how to insert 61000 data objects into sql server 2005? 2009-07-08

    I am trying to insert 61,000+ objects, obtained via a remote call, into a SQL Server 2005 database in the fastest method possible. Any suggestions? I have looked at using SQLBulkCopy, but am having a few problems working out how to get the data into

  • Insert a Date field into a Clipper Database using OLE 2010-01-17

    We're trying to insert data into a clipper database file (DBF file with NTX index file). For a variety of reasons, we cannot change the database format. We are currently seeing two issues: With our existing code, we are not able to update or utilize

  • insert a word document into sql server database? 2011-12-28

    I feel quite overwhelmed with the variety on technologies I would need to use for the above task. I've searched the stack overflow stocks but couldn't pinpoint a solid check list of steps to do this. I would like to get an overview of the steps/tools

  • How can I convert an json object into PHP variable and pass it to PHP script? 2012-02-16

    How can I handle my json object resulted from an Ajax call in PHP file instead of js file (I am using jquery)? Let's say I have a phonebook table with name, phonenum columns. My index file have an input text field and when someone types something and

  • How to Insert System.Datetime object into SqlServer via DbCommand with parameters 2012-03-24

    I try to do this for couple of hours. Database db = DBUtil.GetInstance().GetDataBase(); DbCommand cmd = db.GetSqlStringCommand(@"INSERT INTO [XXX] ( ... ,[FirstDate] ... ) VALUES ('@FirstDate',..."); db.AddInParameter(cmd, "@FirstDate", DbType.Date,

  • C++ Inserting 2D array Object into another 2D array Object 2008-12-27

    In using Dev C++, I a m trying to insert a smaller 2D array object into a larger 2D array object. While attempting to achieve that, I came into compilers errors which I do not know how to solve. I attempt to insert the smaller Object by making it ret

  • C#, insert strongly typed object into XML Document as Element 2009-09-21

    I have an XML document that contains the following structure: Its more or less a collection of Events: <Events> <Event> <DateTime></DateTime> <EventType></EventType> <Result></Result> <Provider>

  • Update and Insert Bulk XML Data into my SQLite Database 2011-04-28

    I want to download a hosted XML document into my app's bundled SQLite database, updating existing rows, or inserting new rows of data as necessary. My thoughts as far as app design are this: App loads. App looks for a connection to XML Host. If conne

  • Nested Json Object Into Array 2011-08-18

    I'm trying to access a nested json array var jsonResponse:Object = JSON.decode(response); var foo:Object = JSON.decode(jsonResponse.nested); var bar:Array = foo as Array; When i inspect foo - its an object with about 50 children objects. I can read t

  • How to handle multiple json objects into array 2011-11-30

    When I make an ajax call I am getting response as multiple json objects. //here is the response when I make ajax call: {"name":"suresh","class":"10th"},{"name":"suresh","class":"10th"} want to put this response into array. Could any one help me how t

  • How to convert JSON object into date format? 2011-12-03

    This is my JSON { 0 = "2011-11-11"; 1 = "2011-12-31"; endDate = "2011-12-31"; startDate = "2011-11-11"; } My code is NSString *dateString = [jsonDict objectForKey:@"0"] // Convert string to date object NSDateFormatter *dateFormat = [[NSDateFormatter

  • Deserializing JSON object into .NET List 2012-02-16

    JSON is created in Java using Jersey's JAXB serializer. I need to deserialize it in .NET application. The problem is in serialized arrays: if array contains several items JSON object is like that: {"users":[{"name":"user1", "email":"[email protected]"}

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.202 (s). 11 q(s)