<commit_before>//
//  RFC4627.Extensions.swift
//  Monolith
//
//  Created by <NAME>. on 10/21/14.
//
//

import Foundation


///	`JSON.Value` is treated as an array when you enumerate on it.
///	If underlying value is not an array, it will cause program crash.
///
extension Standard.JSON.Value : CollectionType {
	
	public var startIndex:Int {
		get {
			precondition(array != nil)
			return	array!.startIndex
		}
	}
	public var endIndex:Int {
		get {
			precondition(array != nil)
			return	array!.endIndex
		}
	}

	public subscript(name:Standard.JSON.SwiftString) -> Value? {
		get {
			return	object?[name]
		}
	}
	public subscript(index:Int) -> Value {
		get {
			return	array![index]
		}
	}
	
	public func generate() -> IndexingGenerator<[Value]> {<commit_msg>Fixed wrong namespace reference in JSON extension.<commit_after>//
//  RFC4627.Extensions.swift
//  Monolith
//
//  Created by <NAME>. on 10/21/14.
//
//

import Foundation


///	`JSON.Value` is treated as an array when you enumerate on it.
///	If underlying value is not an array, it will cause program crash.
///
extension Standard.RFC4627.Value : CollectionType {
	
	public var startIndex:Int {
		get {
			precondition(array != nil)
			return	array!.startIndex
		}
	}
	public var endIndex:Int {
		get {
			precondition(array != nil)
			return	array!.endIndex
		}
	}

	public subscript(name:Standard.JSON.SwiftString) -> Value? {
		get {
			return	object?[name]
		}
	}
	public subscript(index:Int) -> Value {
		get {
			return	array![index]
		}
	}
	
	public func generate() -> IndexingGenerator<[Value]> {
{'fraction_non_alphanumeric': 0.13024142312579415, 'fraction_numerical': 0.015247776365946633, 'mean_word_length': 2.957286432160804, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5146381', 'n_tokens_mistral': 602, 'n_tokens_neox': 521, 'n_words': 142}