<commit_before>package edu.csh.chase.sprint.parameters

import com.squareup.okhttp.MediaType
import com.squareup.okhttp.RequestBody
import edu.csh.chase.sprint.json.JsonBase
import okio.BufferedSink

class JsonBody(private val jsonValue: JsonBase) : RequestBody() {

    override fun contentType(): MediaType? {
        return MediaType.parse("application/json; charset=utf-8")
    }

    override fun writeTo(sink: BufferedSink) {
        sink.writeUtf8(jsonValue.toString())
    }


}<commit_msg>Will now take a List<Any?> or Map<String, Any?> and convert it to a JsonObject and use that for the request body<commit_after>package edu.csh.chase.sprint.parameters

import com.squareup.okhttp.MediaType
import com.squareup.okhttp.RequestBody
import edu.csh.chase.sprint.json.JsonArray
import edu.csh.chase.sprint.json.JsonBase
import edu.csh.chase.sprint.json.JsonObject
import okio.BufferedSink

class JsonBody(private val jsonValue: JsonBase) : RequestBody() {

    constructor(map: Map<String, Any?>) : this(JsonObject(map))

    constructor(list: List<Any?>) : this(JsonArray(list))

    override fun contentType(): MediaType? {
        return MediaType.parse("application/json; charset=utf-8")
    }

    override fun writeTo(sink: BufferedSink) {
        sink.writeUtf8(jsonValue.toString())
    }


}
{'fraction_non_alphanumeric': 0.11179173047473201, 'fraction_numerical': 0.0030627871362940277, 'mean_word_length': 4.445833333333334, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6034451', 'n_tokens_mistral': 433, 'n_tokens_neox': 427, 'n_words': 87}