1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_module_utils/module_utils/Ansible.Test.cs

27 lines
611 B
C#
Raw Normal View History

//AssemblyReference -Name System.Web.Extensions.dll
using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
namespace Ansible.Test
{
public class OutputTest
{
public static string GetString()
{
Dictionary<string, object> obj = new Dictionary<string, object>();
obj["a"] = "a";
obj["b"] = 1;
return ToJson(obj);
}
private static string ToJson(object obj)
{
JavaScriptSerializer jss = new JavaScriptSerializer();
return jss.Serialize(obj);
}
}
}