com.silentgo:json

SilentGo JSON Parser

License

License

MIT
Categories

Categories

JSON Data
GroupId

GroupId

com.silentgo
ArtifactId

ArtifactId

json
Last Version

Last Version

0.0.9
Release Date

Release Date

Type

Type

jar
Description

Description

SilentGo JSON Parser
Project URL

Project URL

https://github.com/Teddy-Zhu
Source Code Management

Source Code Management

https://github.com/Teddy-Zhu/SilentGo

Download json

How to add to project

<!-- https://jarcasting.com/artifacts/com.silentgo/json/ -->
<dependency>
    <groupId>com.silentgo</groupId>
    <artifactId>json</artifactId>
    <version>0.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/com.silentgo/json/
implementation 'com.silentgo:json:0.0.9'
// https://jarcasting.com/artifacts/com.silentgo/json/
implementation ("com.silentgo:json:0.0.9")
'com.silentgo:json:jar:0.0.9'
<dependency org="com.silentgo" name="json" rev="0.0.9">
  <artifact name="json" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.silentgo', module='json', version='0.0.9')
)
libraryDependencies += "com.silentgo" % "json" % "0.0.9"
[com.silentgo/json "0.0.9"]

Dependencies

provided (1)

Group / Artifact Type Version
com.silentgo : utils jar 0.1.15

Project Modules

There are no modules declared in this project.

SilentGo Framework

a light web mvc framework.

framework CN Readme
framework Readme
Demo

TODO LIST

  • dao支持linq语法糖
  • framework route部分规整
  • sql template render , support cusotm syntax , xml, yaml

How to Use

add maven dependency

<dependency>
    <groupId>com.silentgo</groupId>
    <artifactId>framework</artifactId>
    <version>0.0.33</version>
</dependency>

IOC

use with @Inject

AOP

class implements Interceptor.

public interface Interceptor {

    default boolean build(SilentGo me) {
        return true;
    }

    default int priority() {
        return Integer.MIN_VALUE;
    }

    Object resolve(AOPPoint point, boolean[] isResolved) throws Throwable;
}

route

match path , you can use :
	@Controller(value="/path")  
	@Route(value="/{id}/{name}") or @Route(value="/[0-9a-z]+" , regex = true)
match parameters
	public void index(Response reponse,Resquest request ,@PathVariable(value="id") Integer id ,@PathVariable(value="name") String myname, 
	@RequestParam @RequestString( required = true , range = { 5 , 10}) String name)

validate parameters class implements IValidator you can custom validator for parameters yourself

restful
    @Route("/")
    public String index() {
        return "index.jsp";
    }

    @Route("/{string}")
    @ResponseBody
    public String test(@PathVariable String string) {
        LOGGER.info("msg:{}", string);
        return string;
    }

    @Route("/{string}")
    @ResponseBody
    @RouteMatch(method = RequestMethod.POST)
    public String testpost(@PathVariable String string) {
        return "post method :" + string;
    }

    @Route("/{string}")
    @ResponseBody
    @RouteMatch(method = RequestMethod.POST, params = "name=1")
    public String testpost2(@PathVariable String string) {
        return "post method name 1:" + string;
    }

dao

generate dao and db model by tools in framework

how to use

dao class

@Service
public interface SysMenuDao extends BaseDao<SysMenu> {

    SysMenu queryOneWhereId(String id);
}

use

    @Inject
    public SysMenuDao sysMenuDao;

    public String functodo() {
        //function name with rules
        //you can use directly without code;
        SysMenu menuone = sysMenuDao.queryOneWhereId("1");
        
        //for baseDao
        List<SysMenu> menu = sysMenuDao.queryAll();
    }

Versions

Version
0.0.9
0.0.7
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1