Comments (3)
This value is from real world actisense capture:
$ echo '2014-08-15-10:02:21.634,6,129810,43,255,33,18,ec,4a,b6,0d,24,53,52,54,44,54,22,3a,4f,48,32,36,39,32,40,78,00,28,00,0a,00,6e,00,00,00,00,00,00' | analyzer -json
INFO 2014-08-17 20:32:10.637 [analyzer] New PGN 129810 for device 43 (heap 7809 bytes)
{"timestamp":"2014-08-15-10:02:21.634","prio":"6","src":"43","dst":"255","pgn":"129810","description":"AIS Class B static data (msg 24 Part B)","fields":{"Message ID":"24","Repeat indicator":"Initial","User ID":"230050540","Type of ship":"Sailing","Vendor ID":"SRTDT":","Callsign":"OH2692","Length":"12.0","Beam":"4.0","Position reference from Starboard":"1.0","Position reference from Bow":"11.0","Mothership User ID":"0","Reserved":"0","Spare":"0"}}
$ echo '2014-08-15-10:02:21.634,6,129810,43,255,33,18,ec,4a,b6,0d,24,53,52,54,44,54,22,3a,4f,48,32,36,39,32,40,78,00,28,00,0a,00,6e,00,00,00,00,00,00' | analyzer -json | json
INFO 2014-08-17 20:32:14.582 [analyzer] New PGN 129810 for device 43 (heap 7809 bytes)
json: error: input is not JSON: Expected ',' instead of ':' at line 1, column 268:
{"timestamp":"2014-08-15-10:02:21.634","prio":"6","src":"43","dst":"255","pgn":"129810","description":"AIS Class B static data (msg 24 Part B)","fields":{"Message ID":"24","Repeat indicator":"Initial","User ID":"230050540","Type of ship":"Sailing","Vendor ID":"SRTDT":","Callsign":"OH2692","Length":"12.0","Beam":"4.0","Position reference from Starboard":"1.0","Position reference from Bow":"11.0","Mothership User ID":"0","Reserved":"0","Spare":"0"}}
...........................................................................................................................................................................................................................................................................^
{"timestamp":"2014-08-15-10:02:21.634","prio":"6","src":"43","dst":"255","pgn":"129810","description":"AIS Class B static data (msg 24 Part B)","fields":{"Message ID":"24","Repeat indicator":"Initial","User ID":"230050540","Type of ship":"Sailing","Vendor ID":"SRTDT":","Callsign":"OH2692","Length":"12.0","Beam":"4.0","Position reference from Starboard":"1.0","Position reference from Bow":"11.0","Mothership User ID":"0","Reserved":"0","Spare":"0"}}
from canboat.
OK, another case of strange data in some fields not being escaped (or suppressed) properly.
from canboat.
How about fixing this issue once and for all by properly escaping json value output? Would something like https://github.com/json-c/json-c/blob/master/json_object.c#L100 work? Requires an extra buffer at least.
As witnessed earlier I am no C wizard, but can give it a try later on.
from canboat.
Related Issues (20)
- Multiple 'NotAssigned' values. HOT 2
- Json Fast packet syntax documentation HOT 4
- Json PGNs schema HOT 9
- Analysis of PGN130850 (Simrad Event Command) HOT 1
- analyzer -raw option should produce standard raw format
- analyzer: Negative time offsets are not printed correctly
- canboat.xsd says short where unsigned short is intended
- docs: RangeMax for ENTERTAINMENT_PLAY_STATUS_BITFIELD is incorrect
- analyzer: Explanation of 'Match' fields where the value matches should show lookup name, not value
- FieldType FIELDTYPE_LOOKUP defined but not used HOT 5
- PGNs with "LOOKUP_FIELD("Instance", BYTES(1), ENGINE_INSTANCE)" field do not handle values correctly HOT 3
- Garmin GMI20 DIsplay: Backlight Level, Day Night Mode and Colours
- add pgn 65293 definition HOT 3
- PGN 65350
- PGN 127509 (Inverter Status) HOT 6
- Add Support for Yacht Device N2K Format. HOT 3
- analyzer unit conversions? HOT 2
- Argument for change to PGN 65379
- Hi, also i have same question, HOT 6
- Server connection drops with n2kd HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canboat.