Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
json_encode
- Page 1
Re: Video is not the main content of the page
Digital Media
Digital Marketing
Search Engine Strategies
5 Days Ago
by Read a Book
But i am generating the JSON code dynamically. If there is no video than i hide the VideoObject tag with if statement. Should i just remove the `itemscope itemtype="http://schema.org/VideoObject"`
Re: What's the most unexpected hobby or interest you have outside of coding?
Community Center
Geeks' Lounge
1 Week Ago
by toneewa
With "Tennis Elbow", it’s the tendons that connect these muscles to the bones that are primarily affected by this condition. Tendons, which connect muscles to bones, are primarily composed of collagen, a protein that requires several key nutrients for its formation and function. Vitamin A: It can help enhance collagen development. …
Odoo : report creation from JSON data
Programming
Web Development
1 Month Ago
by codewasher
Hi, I am new to Odoo ERP development. I have a requirement as below. I need to connect to an external API and get the response JSON data. From this response, I need to prepare the reports and show it as the list, then click on each item, it will show the report in form view. 1. I have JSON data 2. JSON data has student details, so I need a…
Retrieval Augmented Generation (RAG) with Google Gemma From HuggingFace
Programming
Computer Science
1 Month Ago
by usmanmalik57
In a previous article, I explained [how to fine-tune Google's Gemma model for text classification](https://www.daniweb.com/programming/computer-science/tutorials/541544/fine-tuning-google-gemma-model-for-text-classification-in-python). In this article, I will explain how you can improve performance of a pretrained large language model (LLM) using …
Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification
Programming
Computer Science
1 Month Ago
by usmanmalik57
On March 4, 2024, [Anthropic](https://www.anthropic.com/) launched the [Claude 3 family of large language models](https://www.anthropic.com/news/claude-3-family). Anthropic claimed that its Claude 3 Opus model outperforms GPT-4 on various benchmarks. Intrigued by Anthropic's claim, I performed a simple test to compare the performances of Claude …
PDF Image Table Extractor Web App with Google Gemini Pro and Streamlit
Programming
Computer Science
2 Months Ago
by usmanmalik57
In my previous article, I explained [how to convert PDF image to CSV using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541365/converting-pdf-image-to-csv-using-multimodal-google-gemini-pro). To do so, I wrote a Python script that passes text command to [Google Gemino Pro](https://blog.google/…
retrieve data from json object
Programming
Web Development
10 Years Ago
by An
… if there is a bug after passing
json_encode
$rev[]=intval($info['bIRevNum']); $name[]=$info…name,'rev'=>$rev); } // json encode echo
json_encode
($my_arr); // close connection mysqli_close($connection); ?>…
i get a hyphen at the beginning of the json response php
Programming
Web Development
3 Years Ago
by Abubaker_3
… code - 200 OK http_response_code(200); // make it json format echo
json_encode
( array( "responseCode"=>"", "responseStatus"…
JSON Parameter for Web Service
Programming
Web Development
9 Years Ago
by alex9620
Hi, I am trying to create a web service which will taken in JSON response and then query the DB with it to return store details (JSON response). I intend to use this with a mobile app later on. But during the development I am testing using AJAX calls. I am using a @GET request at the moment. I was able to successfully return a JSON response. I am…
JSON validationd errors
Programming
Web Development
11 Years Ago
by akvarel1
Hello again I am trying to show the errors that can occur by uploading a file (file name, size). I tried to modify this code cut-off but I could not. else format.html { render action: "new" } format.json { render json: @upload.errors, status: :unprocessable_entity } end I have …
Re: JSON and databases
Programming
5 Years Ago
by overwraith
JSON is a markup language, like XML, but vastly different in appearance. It is meant to be read into an object where you can actually use and manipulate the data. Javascript as a convenient method for turning it into a javascript object JSON.parse(jsonObj);. Bear in mind that the actual case of the command is necessary. JSON can be sent to the …
Re: JSON to MySQL with PHP
Programming
Web Development
12 Years Ago
by h3rb
hi all, i have a similar problem with multiline json file that i wish to insert into an sql db. my problem arose as i went from one data set to two. the one data set was sucked from the json file to the sql db via PHP no problems at all, but at the moment i lack the programming skills to complete the nested loop as i am new to programming with JSON…
Re: JSON validationd errors
Programming
Web Development
11 Years Ago
by LastMitch
>I am trying to show the errors that can occur by uploading a file (file name, size). I'm not sure what you are asking. You never mention what uploading file you are using. Plus I got no idea what language for the upload file you are using. You can try this is and see if the message appears: else format.html { render action: "…
JSON to MySQL
Programming
Software Development
12 Years Ago
by scrivomcdivo
Hey folks. I currently have a large JSON file made up of entries similar to the below. The file contains information relating to photographs:- [CODE]{ "SourceFile": "C:/Users/Me/Desktop/Photos/5294030805_9497032cd7_o.jpg", "ExifToolVersion": 8.63, "FileName": "5294030805_9497032cd7_o.jpg",…
JSON to MySQL with PHP
Programming
Web Development
12 Years Ago
by scrivomcdivo
Hey folks. I currently have a large JSON file made up of entries similar to the below. The file contains information relating to photographs:- [CODE]{ "SourceFile": "C:/Users/Me/Desktop/Photos/5294030805_9497032cd7_o.jpg", "ExifToolVersion": 8.63, "FileName": "5294030805_9497032cd7_o.jpg&…
Re: JSON to MySQL with PHP
Programming
Web Development
12 Years Ago
by fenixZ
//First you need to get all needed columns and CREATE TABLE. For this task you need to read the whole file first. //Here we go: //[CODE] $f = file_get_contents('json.txt'); $arr = explode('},',$f); // Prepare for json_decode BUT last } missing $global_arr = array(); // Contains each decoded json (TABLE ROW) $global_keys = array(); // Contains …
Re: JSON
Programming
Web Development
10 Years Ago
by paulkd
JSON is a data storage format. JavaScript is a scripting/programming language. The [website](http://www.json.org) explains it better but the format is "readable" and lightweight. Your text shows that content.txt will contain JSON encoded data. You can use whatever server (PHP, ColdFusion..) or client (JavaScript..) language to read the …
Re: JSON to MySQL with PHP
Programming
Web Development
12 Years Ago
by diafol
you can use json_decode: [url]http://php.net/manual/en/function.json-decode.php[/url] 1. ensure that you have ALL the possible column headers as field names in a table before you start. 2. read the json file into a php string variable. 3. do a json_decode on the variable, ensuring that you choose the 'associative' parameter to true [CODE]$my_arr…
Re: JSON to MySQL
Programming
Software Development
12 Years Ago
by Momerath
You'll have to make two passes over the JSON file, the first to get all the columns and types, second to populate them. In the first pass I'd create a dictionary with the key being the column name, and the value being the full type. What I mean by full is, for example, you have a string value I'd store 'varchar(50)'. As you pass through the file …
Re: JSON Array to store Video titles
Programming
Web Development
11 Years Ago
by LastMitch
>I was told that a JSON array would be the best for this but i don't know how to program this. You can read this tutorial: http://www.webmonkey.com/2010/02/get_started_with_json/#A_Simple_Example:_A_List_of_Movies and also try this: http://www.mkyong.com/java/json-simple-example-read-and-write-json/
Json
Programming
Web Development
10 Years Ago
by thilipdilip
Hi all, I'm having one problem with disapling the json data into ul and li based content with using of foreach() json data from database is [{"id":1},{"id":2,"children":[{"id":3},{"id":4},{"id":5,"children":[{"id":6},{"id":7},{"id&…
Json vs html.erb in ruby
Programming
Web Development
8 Years Ago
by rchawdhari
Hi all, My project is on ruby on rails. I have one of ruby api returns json.jbuilder But I want that my api should not return json , it will display html.erb file Is anybody can help me???
Re: JSON to MySQL with PHP
Programming
Web Development
6 Years Ago
by Hex_1
Just try JTS by Hexide => jts.hexide.pl, easy JSON to SQL, script on GNU, we give You Example, You can edit like You need. And have mercy, this is Startup:D
JSON: Connecting to a web service using authentication
Programming
Web Development
11 Years Ago
by Venom Rush
I have no previous knowledge of connecting to a web service using JSON and I haven't been able to find any examples online that clearly explain how I would go about connecting using authentication. I have the following documentation: Credential (type: Credential) - An object used to authenticate the client MMCode (type: String) RegYear (type: …
Re: JSON: Connecting to a web service using authentication
Programming
Web Development
11 Years Ago
by pritaeas
Your JSON object should probably look something like this: var postData = { "Credential": { "Username" : "user", "Password" : "pass", "ClientIdentifier" : "ident" }, "MMCode" : "code", "RegYear" : …
Re: JSON: Connecting to a web service using authentication
Programming
Web Development
11 Years Ago
by Venom Rush
Hi pritaeas I have the variable setup like that at the moment but I'm not having any luck getting a proper response. Here's my code as it stands <script type="text/javascript"> var usernameString = 'username'; var passwordString = 'pass'; var postdata = { "Credentials": { &…
JSON Array to store Video titles
Programming
Web Development
11 Years Ago
by patk570
Hey guys, I am new to programming and doing everything on my own here. I have a website that I am working on, and i want to add things to a list that is on the side of the search page, and then i want to have it be able to go into a form/PDF page so they can print it out later on. I was told that a JSON array would be the best for this but i don't…
Json Error in Android
Programming
Mobile Development
10 Years Ago
by donelliewhyte
I want to work with the json below in andoroid, but I am getting an error in my app.I will be working extensively with the yummly api but the data i need resides in the matches array, but I am not sure what is the problem. I have also attahed my json code snippet { ` "attribution":{` "html":"…
Encode and decode binary data with base64
Programming
Software Development
14 Years Ago
by X-Boy
I new to Python and I'm trying to make this script work, I made this in php, but I'd like to know how to do it in python... I'm trying to encode a file with base64 and then decode and write the binary data to a file. [CODE=Python]import base64 binaryfile = open("original.mp3").read() file = open("out.txt", "w&…
JSON
Programming
Software Development
12 Years Ago
by M.Waqas Aslam
hello ! I want to use JSON in my asp.net project using c# .how can i do that , i am very new in JS and JSON , please help me so that i can start work .i googled about it , and read some posts on different forums and sites . now i am understanding the JSON .but when i dont know how to use JSON in my project , i use [ICODE] using System.Web.Script.…
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC