# Class JsonConverter

json 转换工具类，用于替换 JsonUtil

#### Version

1.2.0

- Defined in util/JsonConverter.ts:9

##### Index

### Methods

parseToHashMap
parseToMap
parseSafety
stringifyFromHashMap
stringifyFromMap
stringifySafety

## Methods

### `Static` parseToHashMap

- parseToHashMap(jsonString: string): HashMap<string, Object>

  将 json 字符串转为 HashMap

  #### Parameters

  - jsonString: string

    json 字符串

  #### Returns HashMap<string, Object>

  HashMap

  - Defined in util/JsonConverter.ts:17

### `Static` parseToMap

- parseToMap(jsonString: string): Map<string, Object>

  将 json 字符串转为 Map

  #### Parameters

  - jsonString: string

    json 字符串

  #### Returns Map<string, Object>

  Map

  - Defined in util/JsonConverter.ts:41

### `Static` parseSafety

- parseSafety(jsonString: string): any

  将 json 字符串解析为对象

  #### Parameters

  - jsonString: string

    json 字符串

  #### Returns any

  解析后的对象，如果解析失败返回 null

  - Defined in util/JsonConverter.ts:65

### `Static` stringifyFromHashMap

- stringifyFromHashMap(map: HashMap<string, Object>): string

  将 HashMap 变为 json 字符串

  #### Parameters

  - map: HashMap<string, Object>

    HashMap

  #### Returns string

  json 字符串

  - Defined in util/JsonConverter.ts:83

### `Static` stringifyFromMap

- stringifyFromMap(map: Map<string, Object>): string

  将 Map 变为 json 字符串

  #### Parameters

  - map: Map<string, Object>

    Map

  #### Returns string

  json 字符串

  - Defined in util/JsonConverter.ts:97

### `Static` stringifySafety

- stringifySafety(value: any): string

  将对象转为 json 字符串

  #### Parameters

  - value: any

    任意对象

  #### Returns string

  json 字符串，如果对象为 null、undefined、解析失败 会返回空字符串

  - Defined in util/JsonConverter.ts:141