You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Guess structure of protobuf binary from raw data, query binary protobuf without
6
6
7
7
You can explore your proto binary data [here](https://konsumer.js.org/rawproto/). Use it to view, generate proto/json files, or select how to parse fields.
8
8
9
-
If you are coming form an older version, or anothe rlibrary, check out [migration instructions](#migration).
9
+
If you are coming form an older version, or another library, check out [migration instructions](#migration).
10
10
11
11
12
12
## installation
@@ -26,7 +26,7 @@ Install it in your path with `npm i -g rawproto` or use it 1-off with `npx rawpr
26
26
27
27
### code
28
28
29
-
You can use it in code like this:
29
+
You can use it, as a library, in code like this:
30
30
31
31
```js
32
32
import { readFile } from'fs/promises'
@@ -95,11 +95,15 @@ Many things (ui, `toJS`, `toProto`, cli) use `queryMap` which is just a map of `
95
95
}
96
96
```
97
97
98
-
You can use any types, from above, and set the name to whatever you want.
98
+
You can use any types, from above, and set the name to whatever you want. Since it's flat, and JSON doesn;t allow multiple keys with same name, it might help to prefix it, like this:
99
99
100
-
## protoc
100
+
```
101
+
102
+
```
103
+
104
+
### protoc
101
105
102
-
If you already have some of your types defined in a proto file, or just find that easier to make proto in (it generally is much nicer) you can use [protoc-gen-typemap](https://github.com/konsumer/protoc-gen-typemap) to generate typemaps:
106
+
If you already have some of your types defined in a proto file, or just find that easier to make proto typemaps in (it generally is much nicer) you can use [protoc-gen-typemap](https://github.com/konsumer/protoc-gen-typemap) to generate typemaps:
0 commit comments