IronPython的 - JSON的选择 [英] IronPython - JSON choices

查看:183
本文介绍了IronPython的 - JSON的选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是处理JSON在IronPython的2.0.1的最佳方法。本机Python的标准库的JSON看起来是尚未实现。

What is the best way to deal with JSON in IronPython 2.0.1. The native Python "standard library" json looks to be not implemented yet.

如果我想用Newtonsoft Json.NET库是如何做到这一点?我可以在程序集添加到GAC,但什么是我的其他选择吗?

If I wanted to use the Newtonsoft Json.NET library how do I do this? I could add the assembly to the GAC, but what are my other choices?

推荐答案

这个链接提供了补充refernces到.NET的DLL与IronPython的方式概述:的海博罗的博客:IronPython的:clr.AddReference

This link provides an overview of the ways to add refernces to .Net dlls with IronPython: Haibo Luo's weblog : IronPython: clr.AddReference

因此​​,举例来说,如果你likle,以避免将Json.NET库在GAC中,你可以使用

So, for example, if you'd likle to avoid placing the Json.NET library in the GAC you can use

进口CLR
clr.AddReferenceToFile(jsonnet.dll)

import clr
clr.AddReferenceToFile("jsonnet.dll")

clr.AddReferenceToFileAndPath(C:\\ \\库jsonnet.dll)

这篇关于IronPython的 - JSON的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆