Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions lobster/tools/json/input_directory.trlc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package json_req
import req

req.System_Requirement Parse_Input_File {
description = '''
IF a list element given through the command line option "FILE_OR_DIR" is a file,

(OTHERWISE, the tool shall exit with a non-zero return code.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should become a new requirement

'''
}

req.System_Requirement_Aspect Parse_Input_File_JSON_Extension {
description = '''
AND if the file extension is "json" (case-insensitive),
'''
}

req.System_Requirement_Aspect Parse_Input_File_Valid_JSON {
description = '''
AND if the file content is valid JSON,
'''
}

req.System_Requirement_Aspect Parse_Input_File_Input_Items {
description = '''
THEN each key-value pair of the outer-most dictionary of the JSON data struct
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the way it is implemented?

'''
}

req.System_Requirement_Aspect Parse_Input_File_To_Lobster {
description = '''
SHALL be written in the LOBSTER interchange format
'''
}

// missing aspect: how to convert (i.e. what is the item name)?

req.System_Requirement_Aspect Parse_Input_File_To_Stdout {
description = '''
to the file given in the command line option "out",
IF that option is given and is not an empty string,
'''
}

req.System_Requirement_Aspect Parse_Input_File_To_File {
description = '''
OTHERWISE to STDOUT.
'''
}
Loading