Skip to content

Commit

Permalink
Merge branch 'master' into t8
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaguiar authored Mar 1, 2024
2 parents 4268b31 + 0fb9ac2 commit 8f139a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/oafp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions js/openaf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8230,6 +8230,23 @@ AF.prototype.fromSLON = function(aString) {
return _sp.parse(aString)
}

/**
* <odoc>
* <key>AF.fromJSSLON(aString) : Object</key>
* Tries to convert the provided aString into an object. The string might be JSON or SLON.
* </odoc>
*/
AF.prototype.fromJSSLON = function(aString) {
if (!isString(aString) || aString == "" || isNull(aString)) return ""

aString = aString.trim()
if (aString.startsWith("{")) {
return jsonParse(aString, __, __, true)
} else {
return af.fromSLON(aString)
}
}

/**
* <odoc>
* <key>AF.fromNLinq(aString) : Map</key>
Expand Down

0 comments on commit 8f139a0

Please sign in to comment.