# json_markd
**Repository Path**: mirrors_jeffreydwalter/json_markd
## Basic Information
- **Project Name**: json_markd
- **Description**: Go library for generating json from markdown lists
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2022-09-09
- **Last Updated**: 2026-03-29
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# JSON-Markd
Go library for converting markdown lists to json.
Super useful for documenting APIs, maintaining todo list which can be used anywhere once converted to json.
## Installation
```go
go get -u "github.com/mkfeuhrer/json_markd"
```
Then use it using the ParseMarkdown functions. Check example.go for usage.
```go
parser.SetTabSpaceValue(2) // This is important step, library will crash without this.
result, err := parser.ParseMarkdown("data/sample_api.md") // your markdown file path
if err != nil {
logger.Log.Panic(err)
return
}
fmt.Println(result)
```
### Markdown file
```markdown
- data : object
- name : string
- age : integer
- income : double
- vehicles: array
- cars: object
- name: string
- price: double
- apps : array
- transport : array
- gojek : string
- uber : string
- food : array
- zomato : string
- swiggy : string
- errors: object
- type: string
```
### Resulting JSON
```json
{
"data": {
"name": "random string",
"age": 0,
"income": 0.0,
"vehicles": [
{
"name": "random string",
"price": 0.0
}
],
"apps": [
["random string", "random string"],
["random string", "random string"]
]
},
"errors": {
"type": "random string"
}
}
```
## Contraints
Since, this is a relatively new project, I built it for my personal use. Also, the logic code is a bit messy, will improve it.
It has some restrictions -
- You can only use nested lists.
- Ensure your markdown contains no empty lines
- Ensure for lists you use `-` , will include `*` and numbered list later.
**Note** - Check data folder for sample markdown
## Contribute
Feel free to contribute. Add new features or improve existing codebase.
Fork and make a PR :)
Star and share the library with your community.
## Todos
- Add remaining tests
- Support all list formats - `*` and numbered list maybe
## Author
- [Mohit Khare](https://mohitkhare.me)