Struct decoder only works for lowercased fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.1.1
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If no struct tags are provided, the struct decoder will only work if the lowercased struct field name matches the BSON key. This doesn't work for camel-cased fields.

      For example, if the BSON key is "firstBatch", the struct decoder will not find it in the struct because it is looking for "firstbatch".

      Filing this as a question ticket because I'm not sure what we want the behavior to be. At the very least, we should document this behavior and encourage users to always use struct tags.

            Assignee:
            Divjot Arora (Inactive)
            Reporter:
            Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: