Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ConvertTo-Json: implement "streaming" mode #26533

Open
Labels
Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module
@paulhilchey

Description

@paulhilchey

Summary of the new feature / enhancement

Currently, the ConvertTo-Json cmdlet assembles all input objects into an in-memory List, then converts that to one Json string for output. This can be inefficient if there are many input objects.

Enhancing ConvertTo-Json to (optionally) convert each input object to a complete Json string and output
as it is processed offers these benefits:

  • reduced memory usage
  • substantially improved throughput when the output stream is being processed by a separate thread
    or process.

Proposed technical implementation details (optional)

Add anAsStream parameter to the cmdlet and modify the code to convert and output each object individually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp