Method based on JSON (javascript serialized object notation) for passing object-oriented parameters and system
An object-oriented and parameter-based technology, applied in the direction of program control devices, etc., can solve the problem of complex operation of multiple parameter transfers, and achieve the effect of clear structure, convenient operation, and easy understanding
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0028]如图1所示,本发明中的技术方案主要依赖与json格式。
[0029]JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,易于人们阅读和编写,同时也易于机器解析和生成。JSON建构于两种结构:(1)"名称 / 值”对的集合(A collection of name / value pairs),不同的语言中,它被理解为对象(object),纪录(record),结构(struct),字典(dictionary),哈希表(hash table),有键列表(keyed list),或者关联数组(associative array)。(2)值的有序列表(An ordered list of values)。在大部分语言中,它被理解为数组(array)。
[0030]一个简单的json格式描述如下:User={name="tom”,age=23},地址栏传递的是字符串,action也有自己的数据机构(Map,List),在不同的格式,不同的语言之间传递,自然需要解决格式之间转换的问题,js中Json tostring可以有很多框架提供方法,如Extjs,jquery等;Java中Map,listto json也有第三方类库,如json.jar;经过转换后,地址栏传递的将是这样一种格式userinfo.jsp?json={‘user’:{‘username’:’tom’,’age’=23}}。
[0031]下面将参考附图并结合实施例,来详细说明本发明。
[0032]图1是根据本发明实施例的对象化传参的方法的主要步骤的示意图。如图1所示,该方法包括如下的步骤:
[0033]步骤S1:通过页面js将需要传递的参数构造成json对象,然后再通过页面js将所述json对象转化为字符串、并将所述字符串作为url参数的值,以系统实现约定的key进行url参数的传递。
[0034]步骤S2:通过filter拦截特定参数,并将其转化为对象,具体过程包括:通过filter拦截request请求、并获取特定key的value,将所述value转化成对象。
[0035]现有技术中,参数action是从http请求的request里面获取的,request为所有action提供了参数载体;本发明中,对象化的参数为了不和原来的request内参数混淆,需要有自己的载体...
PUM

Abstract
Description
Claims
Application Information

- Generate Ideas
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com