An open API service indexing awesome lists of open source software.

https://github.com/jakepartusch/spring-boot-protobuf-example

Simple Application to demo the use of Protocol Buffers alongside JSON
https://github.com/jakepartusch/spring-boot-protobuf-example

Last synced: 7 months ago
JSON representation

Simple Application to demo the use of Protocol Buffers alongside JSON

Awesome Lists containing this project

README

          

# spring-boot-protobuf-example

## Usage

```
./gradlew bootRun
```

```
curl http://localhost:8080/person/json
curl http://localhost:8080/person/protoBuf
```

### JSON response
```json
{
"firstName": "Jake",
"lastName": "Partusch",
"emailAddress": "jakepartusch@abc.com",
"homeAddress": "123 Seasame Street",
"phoneNumbers": [
{
"areaCode": 123,
"phoneNumber": 1234567
}
]
}
```

### ProtoBuf response
```protobuf
JakePartuschjakepartusch@abc.com"123 Seasame Street*{��K
```