Module 4: Oneof, Map & Schema Evolution
Map Fields (Dictionaries)
Progress: 1 / 2 Lessons
Step 1
Map Fields (Dictionaries)
Key-Value Maps
If you need an associative map (dictionary), you can use themap keyword.
map map_field = N;
*Note: The key_type can be any integer or string type, but not floating point, bytes, or enums.*---
Your Challenge:
Add a map field namedattributes to UserProfile. The keys should be string and the values should be string. Use tag 10.
Criteria (0 / 1)
Action Requiredâ—‹
Has map field attributes = 10
Field 'attributes' is missing
Type required .proto code in editor to pass.
schema.proto|proto3
UTF-8Monaco Engine
Loading Monaco Editor...
proto3package user.service
Messages1
UserProfile
optionalstringid
Tag = 1