Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

JsonPath支持Map条件筛选对象 #1839

Closed
zzy8811 opened this issue May 9, 2018 · 1 comment
Closed

JsonPath支持Map条件筛选对象 #1839

zzy8811 opened this issue May 9, 2018 · 1 comment
Labels
Milestone

Comments

@zzy8811
Copy link

zzy8811 commented May 9, 2018

jsonpath直接支持Map条件筛选

如有以下对象,希望筛选出score>0.7的的对象列表,用jsonPath编写时发现不能支持,目前只支持List模式,是否可直接支持Map?

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONPath;
def jsonStr ="""
{
	"risk_sexy_trade_stream_plus": {
		"score": 0
	},
	"chemical_medicine_stream_plus": {
		"score": 0
	},
	"gambling_trade_stream_plus": {
		"score": 0
	},
	"politics_stream_plus": {
		"score": 0.89513221556685012
	},
	"risk_tool_gun_stream_plus": {
		"score": 0
	},
	"sex_model_stream_plus": {
		"score": 0.7237896928683851
	},
	"risk_tool_cheat_stream_plus": {
		"score": 0
	},
	"risk_tool_certif_stream_plus": {
		"score": 0
	},
	"gamble_model_stream_plus": {
		"score": 0.3453003960431523
	},
	"risk_tool_vpn_stream_plus": {
		"score": 0
	},
	"vpndetect_stream_plus": {
		"score": 0.3467174233072834
	}
}
""";
@wenshao wenshao added the bug label Aug 4, 2018
@wenshao wenshao added this to the 1.2.49 milestone Aug 4, 2018
wenshao added a commit that referenced this issue Aug 5, 2018
@wenshao
Copy link
Member

wenshao commented Aug 5, 2018

https://github.com/alibaba/fastjson/releases/tag/1.2.49
问题已修复,请用新版本

@wenshao wenshao closed this as completed Aug 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants