8000 JSON Serialization/Deserialization by jankuss · Pull Request #12 · jankuss/genq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JSON Serialization/Deserialization #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 71 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
26daf3e
Add json serialization
jankuss Apr 5, 2024
a7bfec7
Add parsing of enums & generation
jankuss Apr 6, 2024
fe35d0d
Fix formatting
jankuss Apr 6, 2024
7d13f21
Change trigger for data class json generation
jankuss Apr 6, 2024
b2893c0
Remove duplicate statement
jankuss Apr 6, 2024
5457a6c
Update README.md
jankuss Apr 6, 2024
a1cc74e
Add tests for JSON
jankuss Apr 6, 2024
977f087
Change error in fromJson
jankuss Apr 6, 2024
477d7f4
Update fixture
jankuss Apr 6, 2024
4d1ea94
More tests
jankuss Apr 7, 2024
49ba4f3
Change "JsonEnum" to "GenqJsonEnum" for better interop with json_seri…
jankuss Apr 7, 2024
9278b1f
Fix type error
jankuss Apr 7, 2024
a393e0f
Add unknown enum value option, add customizable fromJson/toJson
jankuss Apr 7, 2024
4c2a59f
Fix formatting
jankuss Apr 7, 2024
11a84bd
Add utility for viewing dart ast & add more tests for JSON serialization
jankuss Apr 8, 2024
73f44f1
Update generated output
jankuss Apr 8, 2024
8e10e11
Improve documentation
jankuss Apr 8, 2024
b02394a
Add test for custom fromJson/toJson
jankuss Apr 8, 2024
cb519e8
Add support for default value for JSON
jankuss Apr 8, 2024
66d75a3
Fix formatting
jankuss Apr 8, 2024
5cf55dd
Add example
jankuss Apr 9, 2024
a06316f
Add matrix
jankuss Apr 9, 2024
65543a7
Remove generated code
jankuss Apr 9, 2024
b39e1a6
Remove unnecessary http call in example
jankuss Apr 9, 2024
2019ad4
Update README.md
jankuss Apr 9, 2024
c6c7931
Update README.md
jankuss Apr 9, 2024
a1032ff
Update README.md
jankuss Apr 9, 2024
582dd25
Rename GenqReference
jankuss Apr 10, 2024
c7675a2
Change order
jankuss Apr 10, 2024
c0fc6a6
Change naming of AST structures
jankuss Apr 11, 2024
c606aec
Add integration test
jankuss Apr 11, 2024
1ae4fff
Update path to int test script
jankuss Apr 11, 2024
a25d224
Change int test script
jankuss Apr 11, 2024
49dceb3
Update PATH
jankuss Apr 11, 2024
7ffe764
Fix int tests
jankuss Apr 11, 2024
1ebfb06
Fix formatting
jankuss Apr 11, 2024
0b801c5
Remove -run from int test
jankuss Apr 11, 2024
b6cc1e1
Run all except int_test
jankuss Apr 11, 2024
b07a463
Exclude int_test
jankuss Apr 11, 2024
4528e65
Update run_int_tests
jankuss Apr 11, 2024
b49990b
Update path
jankuss Apr 11, 2024
8937f07
Do chmod
jankuss Apr 11, 2024
1a55864
Debug ls
jankuss Apr 11, 2024
095e990
Update
jankuss Apr 11, 2024
a2c9b26
Reorder
jankuss Apr 11, 2024
bf581d6
Update pipeline scripts
jankuss Apr 11, 2024
d1bcae4
Run chmod
jankuss Apr 11, 2024
17374aa
Delete tag.yml pipeline
jankuss Apr 11, 2024
b994483
Fix pipeline
jankuss Apr 11, 2024
ae48d05
Housekeeping
jankuss Apr 11, 2024
9f4e6f2
Add better codegen output for json serialization
jankuss Apr 11, 2024
6e9fb86
Fix formatting
jankuss Apr 11, 2024
f19d472
Improve README.md
jankuss Apr 11, 2024
dc668ac
Update README.md
jankuss Apr 11, 2024
8438216
Update README.md
jankuss Apr 11, 2024
b4cc4eb
Update README.md
jankuss Apr 11, 2024
50acb7f
Update README.md
jankuss Apr 11, 2024
61a4c70
Update logo.png
jankuss Apr 11, 2024
d623930
Update logo
jankuss Apr 11, 2024
503a94d
Update logo.png
jankuss Apr 11, 2024
a5221d8
Update logo.png
jankuss Apr 11, 2024
d4af96b
Update logo.png
jankuss Apr 11, 2024
1adf2ba
Update README.md
jankuss Apr 11, 2024
76cc905
Update README.md
jankuss Apr 11, 2024
e06f11a
Update README.md
jankuss Apr 11, 2024
1e45665
Add comparison image
jankuss Apr 12, 2024
b1268c6
Update example
jankuss Apr 12, 2024
00d2535
Update
jankuss Apr 12, 2024
9cc9ae0
Update README.md
jankuss Apr 12 8000 , 2024
88733da
Update README.md
jankuss Apr 12, 2024
1475b9e
Update README.md
jankuss Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 89 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ name: Go
on:
push:
branches: [ "main" ]
tags:
- "*"
pull_request:
branches: [ "main" ]

permissions:
contents: write

jobs:
check-formatting:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,14 +51,43 @@ jobs:
run: go build -v ./...

- name: Test
run: go test -v ./...
run: go test $(go list ./... | grep -v /int_test)
test-generated:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
channel: [stable, master]
defaults:
run:
working-directory: ./packages/genq_test
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.channel }}
- name: pub get
run: dart pub get
- uses: actions/download-artifact@master
with:
name: dist
path: ./packages/genq_test/dist
- name: chmod
run: chmod +x $(pwd)/dist/genq_linux_amd64_v1/genq
- name: run_tests.sh
run: GENQ_PATH=$(pwd)/dist/genq_linux_amd64_v1/genq ./run_tests.sh
run-example:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples/json
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -62,11 +96,38 @@ jobs:
uses: dart-lang/setup-dart@v1
- name: pub get
run: dart pub get
- name: run_tests.sh
run: ./run_tests.sh
goreleaser:
- uses: actions/download-artifact@master
with:
name: dist
path: ./examples/json/dist
- name: chmod
run: chmod +x $(pwd)/dist/genq_linux_amd64_v1/genq
- name: Generate
run: GENQ_PATH=$(pwd)/dist/genq_linux_amd64_v1/genq ./generate.sh
- name: Analyze
run: dart analyze
- name: Run example
run: dart ./bin/json.dart
run-int-test:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- uses: actions/download-artifact@master
with:
name: dist
path: ./dist
- name: chmod
run: chmod +x $(pwd)/dist/genq_linux_amd64_v1/genq
- name: Run integration test
run: GENQ_PATH=$(pwd)/dist/genq_linux_amd64_v1/genq ./scripts/run_int_tests.sh
build:
runs-on: ubuntu-latest
needs: [test, test-generated, check-formatting]
needs: [test, check-formatting]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -76,12 +137,9 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc.
# It all depends on your needs.
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: build --clean --snapshot
Expand All @@ -95,3 +153,26 @@ jobs:
name: dist
path: |
./tool/dist
goreleaser-deploy:
needs: [build, test, check-formatting, run-example, run-int-test, test-generated]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
workdir: ./tool
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_BREW: ${{ secrets.GH_BREW }}
41 changes: 0 additions & 41 deletions .github/workflows/tag.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_STORE
*.out
asthtml.html
Loading
0