Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

API handling of tab...
 
Notifications
Clear all

API handling of tabs in JSON

3 Posts
2 Users
0 Reactions
3,139 Views
 Dan
(@caccia)
Posts: 340
Contributor
Topic starter
 
[#2666]

Hi,

Encountered an issue while attempting to use the API:
sometimes we get tabulations inside of a JSON response, which is not authorized by the standard. That was creating havoc with our handling 🙂

Quick & dirty solution which maybe seems to do the trick is to replace tabs with t character, but i'm not sure that's very good.
It seems to be in the /api/index/jsonDumpObj function in any case. (?)

Hope it's clear enough...


 
Posted : 22 Oct 2015 20H15
(@babynus)
Posts: 14952
Member Admin
 

Can you provide and example ?
Are the tabs added or are they part of some fields (description or result for instance) ?


 
Posted : 22 Oct 2015 20H28
(@babynus)
Posts: 14952
Member Admin
 

tabs will be removed in API :
$val = preg_replace('/[ ]{2,}|[t]/', ' ', trim($val));

Will be deployed in V5.1.0


 
Posted : 23 Oct 2015 2H16
Share:

Scroll to Top