-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON representation ('value' property) #210
Comments
The values vary because you aren't always representing a list of values. Sometimes you are passing along a single value. I understand that you are suggesting that we always use lists there, even if that list has a single value, though I'm not sure if there are undesired consequences to changing this. We can look into doing this on the JSON/dict side of things, but for API object instances, you can use the
|
I think that always including a list is a bad idea, particularly for CybOX instances, which can never use a list of values. It might be alright to always use them for patterns, but it will still require applications other than python-cybox to do some conditional parsing—python-cybox already takes care of this here. On a related note, we probably don't need to include the |
The return type of the
'value'
property in theto_dict()
varies. ( see AddressObj:AddressObjectType example)I suggest always returning the array, in these situations.
input.xml
script.py
output.json
The text was updated successfully, but these errors were encountered: