<commit_before>Writing a |Cyclus| Input File
=============================
This section will provide an introduction to creating a valid input file for
|Cyclus| by hand.  Because |Cyclus| uses both XML and JSON, input files have clearly defined
sections, or blocks, that can be automatically validated for correctness.

Work is underway to provide a drag-and-drop graphical user interface to
facilitate building |Cyclus| input files in the future.


A Brief Introduction to XML and JSON
------------------------------------
`XML`_ stands for EXtensible Markup Language, and was designed to provide
structure to data in a generic way by grouping the data between starting and
ending "tags".  The tags used to provide that structure are not defined
universally, but each project can invent their own language for those tags.
The data that lies between a pair starting and ending tags may be additional
sections defined by other tags.

`JSON`_(http://www.json.org/) stands for JavaScript Object Notation, and is similar in many ways to XML. JSON was created to replace XML with a more user friendly language. It was designed to be a simpler and easier to use markup language. It does this by cutting out unnecessary parts of the XML language, such as closing tags. One area where JSON excels is that it is a data-oriented language, compared to XML, which is document-oriented.

Here is a simple example of the difference between the XML and JSON languages:


.. code-block:: xml

  <note>
     <to>Matt</to>          <!-- message recipient -->
     <from>Anthony</from>   <!-- message sender -->
     <heading>Cyclus released today</heading>
     <body>We have released Cyclus v1.0 for everyone to use.</body>
  </note>


.. code-block:: json
<commit_msg>Update writing_input.rst<commit_after>Writing a |Cyclus| Input File
=============================
This section will provide an introduction to creating a valid input file for
|Cyclus| by hand.  Because |Cyclus| uses both XML and JSON, input files have clearly defined
sections, or blocks, that can be automatically validated for correctness.

Work is underway to provide a drag-and-drop graphical user interface to
facilitate building |Cyclus| input files in the future.


A Brief Introduction to XML and JSON
------------------------------------
`XML`_ stands for EXtensible Markup Language, and was designed to provide
structure to data in a generic way by grouping the data between starting and
ending "tags".  The tags used to provide that structure are not defined
universally, but each project can invent their own language for those tags.
The data that lies between a pair starting and ending tags may be additional
sections defined by other tags.

`JSON`_ (http://www.json.org/) stands for JavaScript Object Notation, and is similar in many ways to XML. JSON was created to replace XML with a more user friendly language. It was designed to be a simpler and easier to use markup language. It does this by cutting out unnecessary parts of the XML language, such as closing tags. One area where JSON excels is that it is a data-oriented language, compared to XML, which is document-oriented.

Here is a simple example of the difference between the XML and JSON languages:


.. code-block:: xml

  <note>
     <to>Matt</to>          <!-- message recipient -->
     <from>Anthony</from>   <!-- message sender -->
     <heading>Cyclus released today</heading>
     <body>We have released Cyclus v1.0 for everyone to use.</body>
  </note>


.. code-block:: json

{'fraction_non_alphanumeric': 0.0947098976109215, 'fraction_numerical': 0.0011376564277588168, 'mean_word_length': 3.6034031413612566, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4797520', 'n_tokens_mistral': 870, 'n_tokens_neox': 826, 'n_words': 498}