Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
json_decode
- Page 1
Re: Video is not the main content of the page
Digital Media
Digital Marketing
Search Engine Strategies
6 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"`
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 …
Fine Tuning Google Gemma Model for Text Classification in Python
Programming
Computer Science
2 Months Ago
by usmanmalik57
On February 21, 2024, Google released [Gemma](https://ai.google.dev/gemma), a family of state-of-the-art open-source large language models (LLMs). As per initial results, its 7b (seven billion parameter) version is known to perform better than Meta's [Llama 2](https://llama.meta.com/), the previous state-of-the-art open-source LLM. As always, my…
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/…
Re: i don´t understand this syntax error when using OpenCV
Programming
Databases
1 Month Ago
by Audun
Thanks. That sorted it. Now, I have a new problem.. I tried the two variations of quotation marks, without the backslash, and got this: >>> %Run 'open cv - tot.py' Traceback (most recent call last): File "C:\Users\Audun Nilsen\open cv - tot.py", line 8 image = cv2.imread("C:\Users\Audun Nilsen\Pictures\…
Re: Json decode help need
Programming
Web Development
10 Years Ago
by lps
This problem is actually cause by the data is not in correct format. As the data provided is in {features: {forecast10day: 1 }} format while the json decode function accept {"features": {"forecast10day": 1}}
getting error in json decode
Programming
Web Development
8 Years Ago
by blueguy777
…=="") { echo "No output received"; } else { $arr_output =
json_decode
($output, true); if(isset($arr_output['msg'])) { $msg = $arr_output['msg']; $msg_text…
Json decode help need
Programming
Web Development
10 Years Ago
by arafath077
….com/api/ab3f1aefcf4033d4/forecast10day/q/CA/San_Francisco.json"); //$phparrya =
json_decode
($jsonstring); $array_json=
json_decode
($json, true); print_r($obj);`
Re: Json decode help need
Programming
Web Development
10 Years Ago
by Alberto Bucur
… code: <?php $json = file_get_contents("San_Francisco.json"); $array_json=
json_decode
($json, true); //print_r($array_json); display_jsonarray($array_json); function display_jsonarray($array, $lvl_indent…
JSON
Programming
Web Development
10 Years Ago
by davy_yg
Method saving: JSON on file “content.txt” Data Serving Method: 1. Get content for file “content.txt” every page load and put in on parameter. 2. JSON Decode the parameter. So the parameter will be array type. 3. Use desired data for that page. Hello can anyone help me understand the content in the quotation? …
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[/… 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 =
json_decode
($var, true);[/CODE] Data is now in an array 4…
Re: Json Decode
Programming
Web Development
11 Years Ago
by Danny159
Ahhh I have a json in a json will that cause issues, if so how would you resolve it?
Re: Json Decode
Programming
Web Development
11 Years Ago
by blocblue
Why would you need a JSON string inside another JSON string? Encode the entire data structure in one go.
Re: Json Decode
Programming
Web Development
11 Years Ago
by blocblue
Use `var_dump` instead. This will allow you to determine whether `
json_decode
` is returning `null` because the JSON cannot be decoded. If you're pulling the data from a database, did you add slashes or anything when inserting?
Re: json to php
Programming
Web Development
8 Years Ago
by jkon
http://php.net/manual/en/function.json-decode.php
Re: Json decode help need
Programming
Web Development
10 Years Ago
by diafol
What data did you want to extract? The textforecast/forecast data array would be: $array_json['forecast']['txt_forecast']['forecastday'] For a 10 day forecast this contains 20 items - one daytime and one night for each day. It is number-indexed (0-19) The simpleforecast/forecast data array would be: $array_json['forecast']['txt_forecast…
Re: Json decode help need
Programming
Web Development
10 Years Ago
by arafath077
thanks u all..worked
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: getting error in json decode
Programming
Web Development
8 Years Ago
by pritaeas
if($msg == "success") That's case sensitive, and should be: if ($msg == "SUCCESS") or: if (strtolower($msg) == "success")
Re: getting error in json decode
Programming
Web Development
8 Years Ago
by blueguy777
wow perfect! thanks pritaeas
Re: JSON , MYSQL and PHP
Programming
Web Development
9 Years Ago
by jkon
Storing a string in db from JSON decode has really no meaning at all. The only case I can think of that might have some reason is storing data that you don't know what you do with them but you don't want to loose them because might be precious to the application in near future (e.g. all the info data that sends facebook for the user when login). …
Decode Plz Files please Decode
Programming
Web Development
9 Years Ago
by reis02
Decode Please REMOVED
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…
decode using operators?
Programming
Databases
12 Years Ago
by amishraa
Is there a workaround to this as decode does not seem to allow the use of greater than equal sign I am trying to show the comment for any days beyond 4 days, not just 4 days. [CODE] decode(shipdate-orderdate,'4','This is unsatisfactory!') comments from orders [/CODE] Thanks in advance! :)
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
… require other libraries to parse json. I believe PHP uses
json_decode
.
Re: JSON to MySQL with PHP
Programming
Web Development
12 Years Ago
by h3rb
… the second data set: [code=php] $string = file_get_contents($handle); $arr =
json_decode
($string, true); #echo var_dump($arr); //array instances specific to 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: "…
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