Mapping a protobuf type to a SoyMap type

31 views
Skip to first unread message

o...@fleaflicker.com

unread,
Mar 13, 2017, 6:01:57 PM3/13/17
to Closure Templates Discuss
Hi,

It looks like mapping a protobuf type a SoyMap type is currently disabled even though FieldInterpreter#getMapType appears to support it:

* Protos#hasJsMapKey always returns false 
* Protos#getJsMapKeyFieldName always returns null 

Is this deliberate or should there be a way to use proto3 maps to represent SoyMap data?

Thank you, -Ori

Luke Sandberg

unread,
Mar 13, 2017, 6:03:48 PM3/13/17
to Closure Templates Discuss
It is deliberate.  

the js backend for soy cannot currently support proto3 maps,  there have been some design proposals internally but the major issue is that proto3 maps in js are incompatible with the current map<> type in soy

--

---
You received this message because you are subscribed to the Google Groups "Closure Templates Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-templates-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages