在 C#/.Net 中解析 Lua 数据结构的最简单方法 [英] Easiest way to parse a Lua datastructure in C# / .Net

查看:28
本文介绍了在 C#/.Net 中解析 Lua 数据结构的最简单方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在 C# 或任何 .Net 库中解析 Lua 数据结构的简单方法吗?这将类似于 JSON 解码,除了 Lua 而不是 javascript.

Anyone know of an easy way to parse a Lua datastructure in C# or with any .Net library? This would be similar to JSON decoding, except for Lua instead of javascript.

此时看起来我需要自己编写,但希望已经有一些东西了.

At this point it looks like I'll need to write my own, but hoping there's something already out there.

推荐答案

亚历山大所说的.毕竟,实验室是 Lua 的家.

What Alexander said. The lab is the home of Lua, after all.

具体来说,LuaInterface 可以允许 Lua 解释器嵌入到您的应用程序中,以便您可以使用 Lua 自己的解析器来读取数据.这类似于在 C/C++ 应用程序中嵌入 Lua 以用作配置/数据文件语言.LuaCLR 项目在某些时候可能也很有成效,但可能不如成熟.

Specifically, LuaInterface can allow a Lua interpreter to be embedded in your application so that you can use Lua's own parser to read the data. This is analogous to embedding Lua in a C/C++ application for use as a config/datafile language. The LuaCLR project might be fruitful at some point as well, but it may not be quite as mature.

这篇关于在 C#/.Net 中解析 Lua 数据结构的最简单方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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