wwUtils::JsonString

Creates a JSON encoded string from a FoxPro string including the wrapping quotes.

A common use case is to embed JSON variables into HTML documents:

<% section="scripts" %>

model = {
 openCommentBox: <%= JsonBool(poModel.lOpenCommentBox) %>,
 appName: <%= JsonString(poModel.cApplicationName) %>,
 startOn: new Date("<%= JsonDate(poModel.tStartDate) %>")
};
<script src="ShowEntry.js"></script>

<% endsection %>
o.wwUtils.JsonString(lcString)

Return Value

JSON String

Parameters

lcString
String to encode.


See also:

Class wwUtils

© West Wind Technologies, 1996-2019 • Updated: 01/16/19
Comment or report problem with topic