如何处理文档中的json字段不一致

I currently have a large JSON file which has to be stored in the backend (mongodb & Go) and consumed in the front end. I was wondering whether the 3rd field of the documents should be something like "Sub category" instead of the sport name from the 2nd field or whether this is possible as I was thinking this maybe hard to model and deserialise in a backend language due to inconsistency?

sample:

{
  "_id" : ObjectId("55c"),
  "Sport" : "Athletics ",
  "Athletics" : {
    ["Men's Individual", "Women's Individual", "Mixed Relay"]
   }
}

{
  "_id" : ObjectId("56c"),
  "Sport" : "Tennis",
  "Tennis" : ["Men's singles", "Women's singles", "Men's doubles", "Women's doubles", "Mixed doubles"]
}

{
  "_id" : ObjectId("57c"),
  "Sport" : "Swimming",
  "Swimming" : {
    "Men" : ["4×100 m relay", "4×200 m freestyle relay"],
    "Women" : ["4×100 m relay", "4×200 m freestyle relay"]
  }
}

You can do that using json.RawMessage:

package main

import (
    "encoding/json"
    "fmt"
    "log"
)

func main() {
    type Color struct {
        Space string
        Point json.RawMessage // delay parsing until we know the color space
    }
    type RGB struct {
        R uint8
        G uint8
        B uint8
    }
    type YCbCr struct {
        Y  uint8
        Cb int8
        Cr int8
    }

    var j = []byte(`[
        {"Space": "YCbCr", "Point": {"Y": 255, "Cb": 0, "Cr": -10}},
        {"Space": "RGB",   "Point": {"R": 98, "G": 218, "B": 255}}
    ]`)
    var colors []Color
    err := json.Unmarshal(j, &colors)
    if err != nil {
        log.Fatalln("error:", err)
    }

    for _, c := range colors {
        var dst interface{}
        switch c.Space {
        case "RGB":
            dst = new(RGB)
        case "YCbCr":
            dst = new(YCbCr)
        }
        err := json.Unmarshal(c.Point, dst)
        if err != nil {
            log.Fatalln("error:", err)
        }
        fmt.Println(c.Space, dst)
    }
}

I'd agree with the little voice telling you to go with "Sub-Category" instead of trying to deal with inconsistent types. Also, you should combine the 'mens' and 'womens' subcategories in Swimming similar to how you do it it in Tennis and Athletics. This will let you make better use of encoding/json's (and mgo/bson's) mapping features, but I wouldn't call it a 'backend language' problem - consistent data types should make your js (and other client code) nicer, too!