diff --git a/bad_json.json b/bad_json.json new file mode 100644 index 0000000..74704f8 --- /dev/null +++ b/bad_json.json @@ -0,0 +1,56 @@ +{ + "Sender": "node-red", + "BundleData": { + "grupo6": "", + "po": 131639, + "co": 40160809, + "colada": "CE253171 ", + "calidad": "S 355 JO +AR", + "matnr": "BD07-20310223X14 ", + "dibujo": 37, + "operador": "DBL", + "serie": 1, + "nromatricula": "9402555376", + "nro_bulto": "31073", + "etiqueta_doble": "S", + "fecha": 2024104, + "turno": null, + "observacion1": "obser.1", + "observacion2": "obser.2", + "observacion3": "obser.3", + "paquete_longitud": 14, + "paquete_ancho": 4851, + "paquete_alto": 23.1, + "paquete_peso": 4718, + "paquete_nro_secciones": 15, + "paquete_nro_mantos": 2463, + "paquete_nro_secc_manto": 4718, + "seccion_tipo": "UB203X102X23", + "seccion_longitud": 0, + "seccion_ancho": 101.8, + "seccion_alto": 203.2, + "idioma": "S", + "destino": 0, + "hora": 151942, + "horario": 0, + "inst": "EST", + "tren": 0, + "normed": "B82", + "norpro": "B26", + "nortol": "B85", + "spras": null, + "statu": 0, + "crlf": "U", + "maquina": 1, + "padre": "P", + "paqpadre": "PP", + "relevant_time": "15:19", + "desvio": 0, + "pesoteorico": 0, + "pesoteorico_real": 0, + "desvio_teorico_real": 0, + "fecha_impresion": "04/10/2024 15:19:42", + "peso_nivel1": 0 + }, + "TimeStamp": "2024-10-04T13:20:20.377Z" +} \ No newline at end of file diff --git a/internal/types/bundle.go b/internal/types/bundle.go index 9c39c5e..53045bf 100644 --- a/internal/types/bundle.go +++ b/internal/types/bundle.go @@ -34,8 +34,8 @@ type BundleData struct { PaqueteNroSeccManto int `json:"paquete_nro_secc_manto"` SeccionTipo string `gorm:"index" json:"seccion_tipo"` SeccionLongitud int `json:"seccion_longitud"` - SeccionAncho int `json:"seccion_ancho"` - SeccionAlto int `json:"seccion_alto"` + SeccionAncho float64 `json:"seccion_ancho"` + SeccionAlto float64 `json:"seccion_alto"` Idioma string `json:"idioma"` Destino int `json:"destino"` Hora int `json:"hora"`