I tested the free version. I would like to present results and tables of the German Handball Federation in my page. Unfortunately the Json-Stream of handball4all is bracketed.
I can't change the json-stream. wpDataTables cannot read this Json.
[{"lvTypePathStr":"class","lvIDPathStr":"35077","lvTypeLabelStr":"\/ Frauen Hamburg - Schleswig-Holstein Oberliga","dataList":[{"lvTypeNext":"","lvIDNext":0,"levelTypeLabel":"","tabScore":1,"tabTeamname":"MTV Heide","numPlayedGames":7,"n.......
When working with JSON format please note: Currently, wpDataTables accepts this, and only this, format of JSON (see example): a one-level array of same-structured objects where each object will be parsed as a row, and each field inside of the object as a cell. If your software does not return this format, you would need to prepare, as an example some PHP adapter to return one of the formats that wpDataTables would accept.
So unfortunately the brackets like in your example below are not supported.
Hello,
I tested the free version. I would like to present results and tables of the German Handball Federation in my page. Unfortunately the Json-Stream of handball4all is bracketed.
I can't change the json-stream.
wpDataTables cannot read this Json.
[{"lvTypePathStr":"class","lvIDPathStr":"35077","lvTypeLabelStr":"\/ Frauen Hamburg - Schleswig-Holstein Oberliga","dataList":[{"lvTypeNext":"","lvIDNext":0,"levelTypeLabel":"","tabScore":1,"tabTeamname":"MTV Heide","numPlayedGames":7,"n.......
https://h4a.it4sport.de/spo/spo-proxy_public.php?cmd=data&lvTypeNext=class&subType=table&lvIDNext=35077
I always need the dataList entry's
What can I do? In my current json importer I removed the first and the last character with
if (substr(trim($data),0,1) != '{' ) {
$data = preg_replace('/.+?({.+}).+/', '$1', $data);
}
// FIX JSON-feed from Handball4All.de ENDE
.I hope someone can help me. Many clubs in Germany use handball4all.
Thank you.
Boris
HI Boris,
Thank you for your inquire.
Like it is said in our documentation
When working with JSON format please note: Currently, wpDataTables accepts this, and only this, format of JSON (see example): a one-level array of same-structured objects where each object will be parsed as a row, and each field inside of the object as a cell. If your software does not return this format, you would need to prepare, as an example some PHP adapter to return one of the formats that wpDataTables would accept.
So unfortunately the brackets like in your example below are not supported.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables