我有一堆JSON文件,数千种不同的模式.使用 GenSON(Python JSON模式生成器),我设法为每个输入文件.现在,我想做的就是将所有这些不同的文件标准化为一个已定义的模式.这是一个示例:
I have a bunch of JSON files, thousands of different schemas. Using GenSON (the Python JSON schema generator), I managed to create schema files for each of the input files. Now, what I'd like to do is standardize all these different files to one defined schema. Here's an example:
输入
{ "name": "Bob Odenkirk", "title": "Software Engineer", "location": { "locality": "San Francisco", "region": "CA", "country": "United States" }, "age": 62, "status": "Active" }输出
{ "names": ["Bob Odenkirk"], "occupations": ["Software Engineer"], "locations": ["San Francisco, CA"] }本质上,我正在寻找一种语言不可知的方法(即,我不在乎使用哪种编程语言)来定义应如何将输入JSON文件解析为输出JSON文件.
Essentially, I am looking for a language agnostic method (i.e., I don't care what programming language is used) of defining how an input JSON file should be parsed to an output JSON file.
推荐答案URL github /bazaarvoice/jolt#jolt 说Jolt可能就是您想要的东西.
The url github/bazaarvoice/jolt#jolt says that Jolt may be what you're looking for.
震动
用Java编写的JSON到JSON转换库,其中转换的规范"本身就是JSON文档.
JSON to JSON transformation library written in Java where the "specification" for the transform is itself a JSON document.
对...有用
在将其发送给世界之前,先从ElasticSearch,MongoDb,Cassandra等转换JSON数据
Transforming JSON data from ElasticSearch, MongoDb, Cassandra, etc before sending it off to the world
从大型JSON文档中提取数据供您自己消费
Extracting data from a large JSON documents for your own consumption
更多推荐
将一个JSON模式映射到另一个JSON模式
发布评论