How to set Out put to JSON

How to set Out put to JSON

Hi all,

There is any body knows how to make LotusScript web Agent output is JSON?

  1. I have Agent with LotusScript :

Agent Name : getusertitle

sub Initialize

print |{“name”:“Bill Gates”,“Title”:“Domino Developer”}|

end sub

  1. When i run with browser :

http://www.server.com/db.nsf/getusertitle?openagent

  1. The Result like this :
untitle

{“name”:“Bill Gates”,“Title”:“Domino Developer”}

  1. Howw to make the output like JSON format only like this (no html tag) :

{“name”:“Bill Gates”,“Title”:“Domino Developer”}

  1. What i must to do?

Thanks for help.

Subject: Send HTTP headers before content

Do the following:

print |Content-type: application/json|

print ||

print |{“name”:“Bill Gates”,“Title”:“Domino Developer”}|

or for testing purposes:

print |Content-type: text/plain|

print ||

print |{“name”:“Bill Gates”,“Title”:“Domino Developer”}|