En cours

PHP JSON Parsing

I need you to fix my php script. Want i want to do is take a json file ([url removed, login to view]) and return a smaller subset of that json file using php. This is all done in UTF-8 because there are some international characters. The json is encoded in UTF-8 and the new subset i get back needs to be UTF-8 as well. So look at my php file. When you run it returns a smaller version of the json because it returns the videos section and es for language

json file looks like this and the php is returning the [url removed, login to view] section.

{

"videos": [

{

"en": [

],

"es": [

]

}

],

"pdf": [

{

"en": [

],

"es": [

],

"fr": [

]

}

]

}

Now look at the php code though, it is working but i HAD TO EMBED THE JSON WITHIN the php script.

($origJson = '{"videos" ...)

I dont want to do that, i want the php to LOAD the json and run.

($origJson = returnOrigJson();)

However as soon as i use CURL to do a GET request the exact same JSON file from a different location it doesnt work. I think there is an error with CURL that it doesnt understand the ó character.

Then i also want to sort the results by the "id" field ascending.

So the code i have right now for you works as long as the json is embedded within the php file but I dont want to embed it in the file. YOU CAN CHANGE the php as much as you want, but i want to be able to load [url removed, login to view] from [url removed, login to view] and then return the [url removed, login to view] section sorted by id so the result would be exactly as it is below in UTF-8

[

{

"title": "Demostración Product",

"url": "[url removed, login to view]",

"country": "CA, US, NZ",

"id": 4

},

{

"title": "Demostración Video's stuff",

"url": "[url removed, login to view]",

"country": "CA, US, NZ",

"id": 5

},

{

"title": "Demostración",

"url": "[url removed, login to view]",

"country": "CA, US, NZ",

"id": 7

}

]

Compétences : PHP, Architecture Logicielle, XML

Voir plus : parsing json php, php json parsing error, php json fix, php json parsing, php json subset, xml to pdf php, xml to pdf in php, xml pdf php, php xml to pdf, php is, look php id, script php json, curl json parsing error, language converter, php json , php fr, php encoded, new fr, load php, json, json script, JSON PHP, json c, i need to load json, video converter script php

Concernant l'employeur :
( 8 commentaires ) Holladay, United States

N° du projet : #1026683

Décerné à :

tunnhn

Hello, I can fix this error, please check your PM for more details Thanks

40 $ USD en 1 jour
(8 Commentaires)
4.1

10 freelance font une offre moyenne de $81 pour ce travail

toinnisfree

pls chk pmb

100 $ USD en 1 jour
(532 Commentaires)
7.9
AndrwProjects

Let i help with JSON.

75 $ USD en 4 jours
(178 Commentaires)
6.3
wildlily980

Please see pmb

80 $ USD en 2 jours
(41 Commentaires)
6.0
nexuslite

Fix php script to parse json file

100 $ USD en 5 jours
(44 Commentaires)
5.8
TwintyOne

Check PM please ! thank you

85 $ USD en 0 jours
(23 Commentaires)
4.6
joseluisCC

I can started immediately.

100 $ USD en 2 jours
(8 Commentaires)
4.3
greenchoice

hello please check out pmb

50 $ USD en 0 jours
(3 Commentaires)
2.8
vndevweb

Hi, I can help you. Best Regards

80 $ USD en 2 jours
(0 Commentaires)
0.0
powerdevelopment

i can start and complete in an hour...

100 $ USD en 0 jours
(0 Commentaires)
0.0