-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
My Testcode:
import sys
from flow.record import RecordDescriptor, RecordStreamWriter
TestRecord1 = RecordDescriptor(
"test/csv_test1",
[
("string", "field11"),
("string", "field12"),
("string", "field13"),
("dictlist", "field14")
]
)
rec1 = TestRecord1(
field11 = "AB",
field12 = "CD",
field13 = "EF",
field14 = {
"Name": "George",
"Surname": "Washington"
}
)
record_writer = RecordStreamWriter(sys.stdout.buffer)
record_writer.write(rec1)How to run the code:
python3 tests/test-records.py | rdumpExpected output:
[reading from stdin]
<test/csv_test1 field11='AB' field12='CD' field13='EF' field14={'Name': 'George', 'Surname': 'Washington'}>
Actual output:
[reading from stdin]
<test/csv_test1 field11='AB' field12='CD' field13='EF' field14=['Name', 'Surname']>
Suggested Fix
Change to code in
| class dictlist(list, FieldType): |
to
class dictlist(dict, FieldType):Bitbee0
Metadata
Metadata
Assignees
Labels
No labels