mirror of
https://github.com/myvesta/vesta
synced 2025-07-11 07:36:47 -07:00
JSON parser improved. Fixed problem with parsing special symbols
This commit is contained in:
parent
c80f12eaa4
commit
b472a367d5
6 changed files with 107 additions and 11 deletions
|
@ -123,14 +123,17 @@ App.Helpers.getFirstValue = function(obj)
|
|||
return first;
|
||||
}
|
||||
|
||||
App.Helpers.evalJSON = function(string)
|
||||
App.Helpers.evalJSON = function(str)
|
||||
{
|
||||
return $.parseJSON(string);
|
||||
/*str = str.replace(/\\'/gi, '');
|
||||
str = str.replace(/\'/gi, '');
|
||||
fb.warn(str);*/
|
||||
return $.parseJSON(str);
|
||||
}
|
||||
|
||||
App.Helpers.toJSON = function(object)
|
||||
{
|
||||
return ($.toJSON(object).replace(/'/gi, ''));
|
||||
{
|
||||
return ($.toJSON(object).replace(/\\'/gi, ''));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue