首页 \ 问答 \ 将Dictionary转换为JSOn(convert Dictionary into JSOn)

将Dictionary转换为JSOn(convert Dictionary into JSOn)

我想将Dictionary转换为Json。 键是一个字符串,值是CompaignModel的ICollection:

  IDictionary<string, ICollection<BuzzCompaignModel>>  BuzzCompaignByInterest ;

这里包含BuzzCompaign模型:

 public class BuzzCompaignModel
   {
      public long BuzzCompaignId { get; set; }
      public string Name { get; set; }
      public string Description { get; set; }
      public DateTime EndDate { get; set; }
   }

我怎么能将BuzzCompaignByInterest转换为JSON


i want to convert Dictionary into Json. the key is a string and the value is a ICollection of CompaignModel :

  IDictionary<string, ICollection<BuzzCompaignModel>>  BuzzCompaignByInterest ;

and here is what contain BuzzCompaign Model :

 public class BuzzCompaignModel
   {
      public long BuzzCompaignId { get; set; }
      public string Name { get; set; }
      public string Description { get; set; }
      public DateTime EndDate { get; set; }
   }

how can i convert BuzzCompaignByInterest into JSON


原文:https://stackoverflow.com/questions/11576083
更新时间:2023-05-26 11:05

最满意答案

是。 如果你与最终用户而不是程序员打交道,那么为他的平台建立本地解决方案是一个好主意。 创建一个dmg,一个exe和一些linux软件包。 对于exe的东西,看看launch4jjsmooth


Yes. If you dealing with end users and not programmers, building a native solution for his platfrom is a good idea. Create a dmg, a exe and some linux packages. For exe stuff, take a look at launch4j or jsmooth.

相关问答

更多
  • software
  • 在将PHP脚本转换为独立的Windows可执行文件的答案中,有一个非常全面的PHP编译器列表 There's a pretty comprehensive list of PHP compilers in the answer to Convert a PHP script into a stand-alone windows executable
  • 是。 如果你与最终用户而不是程序员打交道,那么为他的平台建立本地解决方案是一个好主意。 创建一个dmg,一个exe和一些linux软件包。 对于exe的东西,看看launch4j或jsmooth 。 Yes. If you dealing with end users and not programmers, building a native solution for his platfrom is a good idea. Create a dmg, a exe and some linux packa ...
  • 将它添加到数组会增加引用计数,因此显式发布会将引用计数保留为1.不是很好的做法(在引用它之前不应该发布某些内容),但在这种情况下它是安全的。 Adding it to the array will increase the reference count, so the explicit release will leave the reference count as 1. It's not good practice (you shouldn't release something until you' ...
  • 它取决于:功能,应用程序,平台和用户。 没有神奇的可用性刻度盘,你只需转动或按钮就可以推动。 即使在上述内容中,可能有多种方式可以使特征更容易被发现,但正确的方法(s?)可能取决于您拥有多少灵活性。 因为你刚刚向实际用户发布了应用程序,我猜你不能重新构建应用程序或对其架构方式进行重大改变以提高可发现性。 这就是为什么可以在早期(在开发过程中)开始并经常进行可用性测试(使用真实用户)。 如果您可以提供一个更具体的功能示例,您希望使其更易被发现,那么您可能会得到更明确的答案。 如果你在https://ux.st ...
  • 您可以通过调用SetEnvironmentVariable为NSIS进程和子进程设置环境变量: System::Call 'Kernel32::SetEnvironmentVariable(t "CLASSPATH", t "c:\some\path\you\got\from\the\registry")' You can set environment variables for the NSIS process and child processes by calling SetEnvironment ...
  • 这取决于反射器与其他一切之间的关系,因为我对这个项目一无所知,所以我无法评论。 GPL依赖版权法:如果您根据版权法做某些事情,则无需关注GPL。 因此,GPL适用于GPLed软件的衍生作品,但不适用于分离软件。 关于什么算作衍生品和什么是分开的,存在一些争论,但我不是律师,也没有立场。 有一点很清楚的是,如果一个程序没有链接到GPLed程序,而是与它并排并通过标准的进程间通信进行通信,那么它就是它自己独立的工作,并且不受GPL的约束。 因此,如果反射器被链接,则它受GPL的约束。 如果它作为自己独立的进程运 ...
  • 如果用户有足够的知识,则无法阻止用户查找您的程序执行的操作。 即使没有PDB,也可以使用一种称为逆向工程的技术来找出您的程序的功能。 像IDA Pro这样的程序非常擅长。 使用中间语言的编程语言(如C#和Java)几乎都是在源代码中提供的。 像dotPeek这样的工具可以显示反编译的源代码,令人难以置信的是它与真实源代码的接近程度。 关于PDB,有公共PDB和私有PDB。 您通常会向公众提供公共PDB(顾名思义)并保留私有PDB以进行内部调试。 可以使用名为PDBCopy的工具(使用-p参数)将私有PDB( ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)