public static MapLocationWithDescriptionJSON from_MapLocationJSON_json(MapLocationJSON ancestor, bool ignore_extras)
    {
        Debug.Assert(ancestor != null);
        MapLocationWithDescriptionJSON result;

        {
            HoldingGenerator handler = new HoldingGenerator("Type MapLocationWithDescription", ignore_extras);
            ancestor.write_as_json(handler);
            result = handler.value;
        }
        return(result);
    }
 public virtual void write_fields_as_json(JSONHandler handler, bool partial_allowed)
 {
     handler.pair("LocationType", getLocationType());
     Debug.Assert(partial_allowed || flagHasLocation);
     if (flagHasLocation)
     {
         handler.start_pair("Location");
         if (partial_allowed)
         {
             storeLocation.write_partial_as_json(handler);
         }
         else
         {
             storeLocation.write_as_json(handler);
         }
     }
 }